Package io.pmem.pmemkv
Class ByteBufferConverter
java.lang.Object
io.pmem.pmemkv.ByteBufferConverter
- All Implemented Interfaces:
Converter<ByteBuffer>
Impementation of Converter interface for ByteBuffer type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromByteBuffer(ByteBuffer entry) Defines how object stored in pmemkv will be converted from ByteBuffer back to type T to be passed to the callback functionstoByteBuffer(ByteBuffer entry) Defines how object of type T will be converted to ByteBuffer and stored in pmemkv
-
Constructor Details
-
ByteBufferConverter
public ByteBufferConverter()
-
-
Method Details
-
toByteBuffer
Description copied from interface:ConverterDefines how object of type T will be converted to ByteBuffer and stored in pmemkv- Specified by:
toByteBufferin interfaceConverter<ByteBuffer>- Parameters:
entry- Object of type T, which will be stored in pmemkv- Returns:
- ByteBuffer representation of passed objects
-
fromByteBuffer
Description copied from interface:ConverterDefines how object stored in pmemkv will be converted from ByteBuffer back to type T to be passed to the callback functions- Specified by:
fromByteBufferin interfaceConverter<ByteBuffer>- Parameters:
entry- ByteBuffer stored in pmemkv- Returns:
- Object of type T, which will be passed to the callback functions
-