code: public long add(T item) {
          final long nextSequence = ringbuffer.peekNextTailSequence();
          if (store.isEnabled()) {
              try {
                  store.store(nextSequence, convertToData(item));
              } catch (Exception e) {
                  throw new HazelcastException(e);
              }
          }
  
          final long storedSequence = addInternal(item);
          if (storedSequence != nextSequence) {
              throw new IllegalStateException("Sequence we stored the item with and Ringbuffer sequence differs. Was the "
                      + "Ringbuffer mutated from multiple threads?");
          }
  
          return storedSequence;
      }
docs: Adds one item to the ring buffer. Sets the expiration time if TTL is
  configured and also attempts to store the item in the data store if one
  is configured. The provided {@code item} can be {@link Data} or the
  deserialized object.
  The provided item will be transformed to the configured ringbuffer
  {@link InMemoryFormat} if necessary.
  
  @param item item to be stored in the ring buffer and data store, can be
  {@link Data} or an deserialized object
  @return the sequence ID of the item stored in the ring buffer
  @throws HazelcastException              if there was any exception thrown by the data store
  @throws HazelcastSerializationException if the ring buffer is configured to keep items in object format and the
  item could not be deserialized