public interface Persistable extends Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
decode(byte[] decode)
Decode the content of the given
byte array in to this persistable
|
void |
decode(ByteBuffer buffer)
Decode from the given
ByteBuffer |
void |
decode(InputStream inputStream)
Decode from the given input stream
|
byte[] |
encode() |
void |
encode(ByteBuffer buffer)
Encode this persistable in to a
ByteBuffer |
void |
encode(OutputStream outputStream)
Encode this persistable in to an output stream
|
int |
encodingLengthBytes()
Length of the encoding, in bytes, when using
encode()
Length may be different using encode(OutputStream), due to things like stream headers |
String |
getSessionID()
Get the session id
|
long |
getTimeStamp()
Get when this was created.
|
String |
getTypeID()
Get the type id
|
String |
getWorkerID()
Get the worker id
|
String getSessionID()
String getTypeID()
String getWorkerID()
long getTimeStamp()
int encodingLengthBytes()
encode()
Length may be different using encode(OutputStream), due to things like stream headersbyte[] encode()
void encode(ByteBuffer buffer)
ByteBufferbuffer - void encode(OutputStream outputStream) throws IOException
outputStream - IOExceptionvoid decode(byte[] decode)
decode - void decode(ByteBuffer buffer)
ByteBufferbuffer - void decode(InputStream inputStream) throws IOException
inputStream - IOExceptionCopyright © 2017. All rights reserved.