public interface DataSerializer
Implement the child interfaces to add additional functionality to the DataSerializer.
The serialized form typically needs the data type and/or attribute encoded into it so that single attributes can be extracted from the serialized form.
Use the MapSerializerPlugin
, KeySerializerPlugin
and
ValueSerializerPlugin
interfaces to create custom DataSerializers that can be used
to interact with data objects stored in BackingMap
s.
Modifier and Type | Interface and Description |
---|---|
static interface |
DataSerializer.DataAttributeInflatable
DataSerializers implement this interface to allow inflating attributes from the serialized
form of a data object.
|
static interface |
DataSerializer.Identifiable
DataSerializers implement this interface to allow an alternative identity.
|
static class |
DataSerializer.SpecialValue
|
static interface |
DataSerializer.UserReadable
DataSerializers implement this optional interface to allow a customized human readable
representation of a data object.
|
Modifier and Type | Method and Description |
---|---|
Object |
inflateDataObject(DataObjectContext ctx,
XsDataInputStream dataObjectInput)
Inflate a data object from the specified data input stream.
|
void |
serializeDataObject(DataObjectContext ctx,
Object dataObject,
XsDataOutputStream dataObjectOutput)
Serialize the specified data object.
|
void serializeDataObject(DataObjectContext ctx, Object dataObject, XsDataOutputStream dataObjectOutput) throws IOException
Do not store or use the data stream beyond the confines of this method call. The data stream is owned by the WebSphere eXtreme Scale framework and my be closed, pooled or reused as required.
ctx
- the Context of the method call.dataObject
- the object to serialize. The object may be null.dataObjectOutput
- the data output stream to receive the serialized form of the object.IOException
- thrown if there is a problem serializing the data.Object inflateDataObject(DataObjectContext ctx, XsDataInputStream dataObjectInput) throws IOException
Do not store or use the data stream beyond the confines of this method call. The data stream is owned by the WebSphere eXtreme Scale framework and my be closed, pooled or reused as required.
ctx
- the Context of the method call.dataObjectInput
- the data input stream to read the object, produced from
serializeDataObject(DataObjectContext, Object, XsDataOutputStream)
.
Must not be null.IOException
- thrown if there is a problem reading the data.