public class PagingPredicate extends Object implements IndexAwarePredicate, DataSerializable
reset()| Constructor and Description |
|---|
PagingPredicate()
Used for serialization internally
|
PagingPredicate(Comparator<Map.Entry> comparator,
int pageSize)
Construct with a comparator and pageSize
results will not be filtered
results will be ordered via comparator
throws
IllegalArgumentException if pageSize is not greater than 0 |
PagingPredicate(int pageSize)
Construct with a pageSize
results will not be filtered
results will be natural ordered
throws
IllegalArgumentException if pageSize is not greater than 0 |
PagingPredicate(Predicate predicate,
Comparator<Map.Entry> comparator,
int pageSize)
Construct with an inner predicate, comparator and pageSize
results will be filtered via inner predicate
results will be ordered via comparator
throws
IllegalArgumentException if pageSize is not greater than 0
throws IllegalArgumentException if inner predicate is also PagingPredicate |
PagingPredicate(Predicate predicate,
int pageSize)
Construct with an inner predicate and pageSize
results will be filtered via inner predicate
results will be natural ordered
throws
IllegalArgumentException if pageSize is not greater than 0
throws IllegalArgumentException if inner predicate is also PagingPredicate |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(Map.Entry mapEntry)
Used for delegating filtering to inner predicate
|
Set<com.hazelcast.query.impl.QueryableEntry> |
filter(com.hazelcast.query.impl.QueryContext queryContext)
Used if inner predicate is instanceof
IndexAwarePredicate for filtering |
Map.Entry |
getAnchor() |
Comparator<Map.Entry> |
getComparator() |
com.hazelcast.util.IterationType |
getIterationType() |
int |
getPage() |
int |
getPageSize() |
Predicate |
getPredicate() |
boolean |
isIndexed(com.hazelcast.query.impl.QueryContext queryContext)
Used if inner predicate is instanceof
IndexAwarePredicate for checking if indexed |
void |
nextPage()
setting the page value to next page
|
void |
previousPage()
setting the page value to previous page
|
void |
readData(com.hazelcast.nio.ObjectDataInput in)
Reads fields from the input stream
|
void |
reset()
resets for reuse
|
void |
setIterationType(com.hazelcast.util.IterationType iterationType) |
void |
writeData(com.hazelcast.nio.ObjectDataOutput out)
Writes object fields to output stream
|
public PagingPredicate()
public PagingPredicate(int pageSize)
IllegalArgumentException if pageSize is not greater than 0pageSize - public PagingPredicate(Predicate predicate, int pageSize)
IllegalArgumentException if pageSize is not greater than 0
throws IllegalArgumentException if inner predicate is also PagingPredicatepredicate - pageSize - public PagingPredicate(Comparator<Map.Entry> comparator, int pageSize)
IllegalArgumentException if pageSize is not greater than 0comparator - pageSize - public PagingPredicate(Predicate predicate, Comparator<Map.Entry> comparator, int pageSize)
IllegalArgumentException if pageSize is not greater than 0
throws IllegalArgumentException if inner predicate is also PagingPredicatepredicate - comparator - pageSize - public Set<com.hazelcast.query.impl.QueryableEntry> filter(com.hazelcast.query.impl.QueryContext queryContext)
IndexAwarePredicate for filteringfilter in interface IndexAwarePredicatequeryContext - public boolean isIndexed(com.hazelcast.query.impl.QueryContext queryContext)
IndexAwarePredicate for checking if indexedisIndexed in interface IndexAwarePredicatequeryContext - public boolean apply(Map.Entry mapEntry)
public void reset()
public void nextPage()
public void previousPage()
public com.hazelcast.util.IterationType getIterationType()
public void setIterationType(com.hazelcast.util.IterationType iterationType)
public int getPage()
public int getPageSize()
public Predicate getPredicate()
public Comparator<Map.Entry> getComparator()
public Map.Entry getAnchor()
public void writeData(com.hazelcast.nio.ObjectDataOutput out)
throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOExceptionpublic void readData(com.hazelcast.nio.ObjectDataInput in)
throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOExceptionCopyright © 2014 Hazelcast, Inc.. All Rights Reserved.