K - type of the key of the MultiMapV - type of the value of the MultiMappublic class MultiMapKeyValueSource<K,V> extends KeyValueSource<K,V> implements IdentifiedDataSerializable, PartitionIdAware
KeyValueSource implementation is used in
KeyValueSource.fromMultiMap(com.hazelcast.core.MultiMap) to generate a default
implementation based on a Hazelcast MultiMap.| Constructor and Description |
|---|
MultiMapKeyValueSource(String multiMapName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Map.Entry<K,V> |
element()
Returns the current index element
Calls to this method won't change state.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
String |
getMultiMapName() |
boolean |
hasNext()
Called to request if at least one more key-value pair is available from this
data source.
|
K |
key()
Returns the current index key for
KeyPredicate analysis. |
boolean |
open(NodeEngine nodeEngine)
This method is called before accessing the key-value pairs of this KeyValueSource.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
boolean |
reset()
This method resets all internal state to be a new instance.
|
void |
setPartitionId(int partitionId)
Sets the partition ID to the implementing instance it is executed against
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
fromList, fromMap, fromMultiMap, fromSet, getAllKeys, getAllKeys0, isAllKeysSupportedpublic MultiMapKeyValueSource(String multiMapName)
public String getMultiMapName()
public boolean open(NodeEngine nodeEngine)
KeyValueSourceopen in class KeyValueSource<K,V>nodeEngine - nodeEngine of this cluster nodepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean hasNext()
KeyValueSourcehasNext in class KeyValueSource<K,V>public K key()
KeyValueSourceKeyPredicate analysis. This is called
to prevent a possible deserialization of unneeded values because the key is not
interesting for the running mapreduce algorithm.
Calls to this method won't change state.key in class KeyValueSource<K,V>KeyPredicate analysispublic Map.Entry<K,V> element()
KeyValueSourceelement in class KeyValueSource<K,V>public boolean reset()
KeyValueSourcePartitionIdAware.KeyValueSource.open(com.hazelcast.spi.NodeEngine)
and Closeable.close() is called multiple times with the other methods between open(...) and close().reset in class KeyValueSource<K,V>public void setPartitionId(int partitionId)
PartitionIdAwaresetPartitionId in interface PartitionIdAwarepartitionId - current partition IDpublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - 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
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializableCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.