KeyIn
- the input key typeValueIn
- the input value typeValueOut
- the output value typepublic class KeyPredicateSupplier<KeyIn,ValueIn,ValueOut> extends Supplier<KeyIn,ValueIn,ValueOut> implements IdentifiedDataSerializable
KeyPredicate
s, used
to filter and optionally transform data (using the given
Supplier
).Constructor and Description |
---|
KeyPredicateSupplier(KeyPredicate<KeyIn> keyPredicate) |
KeyPredicateSupplier(KeyPredicate<KeyIn> keyPredicate,
Supplier<KeyIn,ValueIn,ValueOut> chainedSupplier) |
Modifier and Type | Method and Description |
---|---|
ValueOut |
apply(Map.Entry<KeyIn,ValueIn> entry)
The apply method is used to apply the actual filtering or extraction / transformation
to the input entry.
If the input value should be ignored by the aggregation, the Supplier has to return |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
all, all, fromKeyPredicate, fromKeyPredicate, fromPredicate, fromPredicate
public KeyPredicateSupplier(KeyPredicate<KeyIn> keyPredicate)
public ValueOut apply(Map.Entry<KeyIn,ValueIn> entry)
Supplier
nullas the supplied value, therefor
nullis not a legal value itself!
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
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 © 2022 Hazelcast, Inc.. All Rights Reserved.