Package org.opendaylight.raft.journal
Interface ToByteBufMapper<T>
- Type Parameters:
T
- Internal representation type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface for transforming internal represetation to bytes.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
objectToBytes
(T obj, ByteBuf buf) Converts an object into a series of bytes in the specifiedByteBuf
.
-
Method Details
-
objectToBytes
Converts an object into a series of bytes in the specifiedByteBuf
.- Parameters:
obj
- the objectbuf
- target buffer- Returns:
true
if the writeout completed,false
if the buffer has insufficient capacity- Throws:
IOException
- if an I/O error occurs
-