K
- type of the entry keyV
- type of the entry valuepublic class PartitionPredicateImpl<K,V> extends Object implements PartitionPredicate<K,V>, IdentifiedDataSerializable
PartitionPredicate
.Constructor and Description |
---|
PartitionPredicateImpl() |
PartitionPredicateImpl(Object partitionKey,
Predicate<K,V> target)
Creates a new PartitionPredicate.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(Map.Entry<K,V> mapEntry)
Applies this predicate to the given map entry.
|
boolean |
equals(Object o) |
int |
getClassId()
Returns type identifier for this class.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
Object |
getPartitionKey()
Returns the partition key that determines the partition the target
Predicate is going to execute on. |
Predicate<K,V> |
getTarget()
Returns the target
Predicate . |
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public Object getPartitionKey()
Predicate
is going to execute on.getPartitionKey
in interface PartitionPredicate<K,V>
public Predicate<K,V> getTarget()
Predicate
.getTarget
in interface PartitionPredicate<K,V>
Predicate
.public boolean apply(Map.Entry<K,V> mapEntry)
Predicate
Implementations must be thread-safe, since this method may be called by multiple threads concurrently.
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2019 Hazelcast, Inc.. All rights reserved.