V
- type of the values inside the IListpublic class ListKeyValueSource<V> extends KeyValueSource<String,V> implements IdentifiedDataSerializable
KeyValueSource
implementation is used in
KeyValueSource.fromList(com.hazelcast.core.IList)
to generate a default
implementation based on a Hazelcast IList
.Constructor and Description |
---|
ListKeyValueSource() |
ListKeyValueSource(String listName) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map.Entry<String,V> |
element()
Returns the current index' element
|
int |
getFactoryId()
Returns DataSerializableFactory factory id for this class.
|
int |
getId()
Returns type identifier for this class.
|
boolean |
hasNext()
Called to request if at least one more key-value pair is available from this
data source.
|
String |
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 need to reset all internal state as it would be a new instance at all.
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
fromList, fromMap, fromMultiMap, fromSet, getAllKeys, getAllKeys0, isAllKeysSupported
public ListKeyValueSource()
public ListKeyValueSource(String listName)
public boolean open(NodeEngine nodeEngine)
KeyValueSource
open
in class KeyValueSource<String,V>
nodeEngine
- nodeEngine of this cluster nodepublic boolean hasNext()
KeyValueSource
hasNext
in class KeyValueSource<String,V>
public String key()
KeyValueSource
KeyPredicate
analysis. This is called
to prevent a possible deserialization of unneeded values because the key is not
interesting for the running mapreduce algorithm.key
in class KeyValueSource<String,V>
public Map.Entry<String,V> element()
KeyValueSource
element
in class KeyValueSource<String,V>
public boolean reset()
KeyValueSource
PartitionIdAware
.KeyValueSource.reset()
, 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<String,V>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.