public class PortableReadResultSet<E> extends Object implements Portable, ReadResultSet<E>
Constructor and Description |
---|
PortableReadResultSet() |
PortableReadResultSet(int readCount,
List<Data> items,
long[] seqs) |
Modifier and Type | Method and Description |
---|---|
E |
get(int index)
Gets the item at the given index.
|
int |
getClassId()
Returns class identifier for this portable class.
|
List<Data> |
getDataItems() |
int |
getFactoryId()
Returns PortableFactory ID for this portable class
|
long |
getSequence(int index)
Return the sequence number for the item at the given index.
|
Iterator<E> |
iterator() |
int |
readCount()
Returns the number of items that have been read before filtering.
|
void |
readPortable(PortableReader reader)
Read portable fields using PortableReader
|
void |
setSerializationService(SerializationService serializationService) |
int |
size()
Return the result set size.
|
void |
writePortable(PortableWriter writer)
Serialize this portable object using PortableWriter
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public void setSerializationService(SerializationService serializationService)
public int readCount()
ReadResultSet
If no filter is set, then the readCount will be equal to ReadResultSet.size()
. But if a filter is applied, it could be that items
are read, but are filtered out. So if you are trying to make another read based on the ReadResultSet then you should
increment the sequence by readCount and not by size. Otherwise you will be re-reading the same filtered messages.
readCount
in interface ReadResultSet<E>
public E get(int index)
ReadResultSet
get
in interface ReadResultSet<E>
index
- the indexpublic long getSequence(int index)
ReadResultSet
UnsupportedOperationException
if there are no
sequences available. This can happen when the cluster version is
Versions.V3_8
or lower.getSequence
in interface ReadResultSet<E>
index
- the indexCluster.getClusterVersion()
public int size()
ReadResultSet
ReadResultSet.readCount()
.size
in interface ReadResultSet<E>
public int getFactoryId()
Portable
getFactoryId
in interface Portable
public int getClassId()
Portable
getClassId
in interface Portable
public void writePortable(PortableWriter writer) throws IOException
Portable
writePortable
in interface Portable
writer
- PortableWriterIOException
public void readPortable(PortableReader reader) throws IOException
Portable
readPortable
in interface Portable
reader
- PortableReaderIOException
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.