IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.websphere.objectgrid.plugins.io.KeyDataSerializer
KeyDataSerializer.Partitionable
 
Nested classes/interfaces inherited from interface com.ibm.websphere.objectgrid.plugins.io.DataSerializer
DataSerializer.DataAttributeInflatable, DataSerializer.Identifiable, DataSerializer.SpecialValue, DataSerializer.UserReadable
 
Method Summary
 int getPartitionHashCode(DataObjectContext ctx, XsDataInputStream dataObject)
          Invoked from clients when it needs to use a partition other than the one normally calculated from it's identity.
 
Methods inherited from interface com.ibm.websphere.objectgrid.plugins.io.KeyDataSerializer
getKeyDataDescriptor
 
Methods inherited from interface com.ibm.websphere.objectgrid.plugins.io.DataSerializer.DataAttributeInflatable
getAttributeContexts, inflateDataObjectAttributes
 
Methods inherited from interface com.ibm.websphere.objectgrid.plugins.io.DataSerializer.Identifiable
equals, hasBinaryEquality, hashCode
 
Methods inherited from interface com.ibm.websphere.objectgrid.plugins.io.DataSerializer
inflateDataObject, serializeDataObject
 

Method Detail

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.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.