public long addAll ( T [ ] items ) { long firstSequence = ringbuffer . peekNextTailSequence ( ) ; long lastSequence = ringbuffer . peekNextTailSequence ( ) ; if ( store . isEnabled ( ) && items . length != 0 ) { try { store . storeAll ( firstSequence , convertToData ( items ) ) ; } catch ( Exception e ) { throw new HazelcastException ( e ) ; } } for ( int i = 0 ; i < items . length ; i ++ ) { lastSequence = addInternal ( items [ i ] ) ; } return lastSequence ; }
Adds all items to the ringbuffer . Sets the expiration time if TTL is configured and also attempts to store the items in the data store if one is configured .