K
- P
- public final class PartitionAwareKey<K,P> extends Object implements PartitionAware<Object>, DataSerializable
PartitionAware
key. This is useful in combination with a Map where you want to control the
partition of a key.Constructor and Description |
---|
PartitionAwareKey(K key,
P partitionKey)
Creates a new PartitionAwareKey.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object thatObject) |
K |
getKey() |
P |
getPartitionKey()
The key object that will be used by Hazelcast to specify the partition.
|
int |
hashCode() |
void |
readData(com.hazelcast.nio.ObjectDataInput in) |
String |
toString() |
void |
writeData(com.hazelcast.nio.ObjectDataOutput out) |
public PartitionAwareKey(K key, P partitionKey)
key
- the keypartitionKey
- the partitionKeyIllegalArgumentException
- if key or partitionKey is null.public K getKey()
public P getPartitionKey()
PartitionAware
getPartitionKey
in interface PartitionAware<Object>
public void writeData(com.hazelcast.nio.ObjectDataOutput out) throws IOException
writeData
in interface DataSerializable
IOException
public void readData(com.hazelcast.nio.ObjectDataInput in) throws IOException
readData
in interface DataSerializable
IOException
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.