com.ibm.websphere.objectgrid.plugins.io
Interface KeyDataSerializer.Partitionable
- All Superinterfaces:
- DataSerializer, DataSerializer.DataAttributeInflatable, DataSerializer.Identifiable, KeyDataSerializer
- Enclosing interface:
- KeyDataSerializer
public static interface KeyDataSerializer.Partitionable
- extends KeyDataSerializer
KeyDataSerializers can implement this optional interface to use alternative partitioning scheme.
- Since:
- 7.1.1
getPartitionHashCode
int getPartitionHashCode(DataObjectContext ctx,
XsDataInputStream dataObject)
throws IOException
- Invoked from clients when it needs to use a partition other than the one normally
calculated from it's identity.
The partition is typically the hashCode of one or more of the key attributes.
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.
- Parameters:
ctx
- the context of the method call.dataObject
- the data input stream to read the object, produced from
DataSerializer.serializeDataObject(DataObjectContext, Object, XsDataOutputStream)
.
Must not be null.
- Returns:
- the partition id to send to the PartitionManager.
- Throws:
IOException
- thrown if there is a problem reading the data.
© Copyright International Business Machines Corp 2005,2012. All rights reserved.