code: private E convertToRingbufferFormat(Object item) {
          return inMemoryFormat == OBJECT
                  ? (E) serializationService.toObject(item)
                  : (E) serializationService.toData(item);
      }
docs: Converts the {@code item} into the ringbuffer {@link InMemoryFormat} or
  keeps it unchanged if the supplied argument is already in the ringbuffer
  format.
  
  @param item the item
  @return the binary or deserialized format, depending on the {@link RingbufferContainer#inMemoryFormat}
  @throws HazelcastSerializationException if the ring buffer is configured to keep items
  in object format and the item could not be deserialized