Package org.apache.ignite.cache.query
Class ScanQuery<K,V>
- java.lang.Object
- 
- org.apache.ignite.cache.query.Query<javax.cache.Cache.Entry<K,V>>
- 
- org.apache.ignite.cache.query.ScanQuery<K,V>
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public final class ScanQuery<K,V> extends Query<javax.cache.Cache.Entry<K,V>> Scan query over cache entries. Will accept all the entries if no predicate was set.- See Also:
- IgniteCache.query(Query), Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.ignite.cache.query.QueryDFLT_PAGE_SIZE
 
- 
 - 
Constructor SummaryConstructors Constructor Description ScanQuery()Create scan query returning all entries.ScanQuery(int part)Creates partition scan query returning all entries for given partition.ScanQuery(@Nullable Integer part, @Nullable IgniteBiPredicate<K,V> filter)Create scan query with filter.ScanQuery(@Nullable IgniteBiPredicate<K,V> filter)Create scan query with filter.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IgniteBiPredicate<K,V>getFilter()Gets filter.@Nullable IntegergetPartition()Gets partition number over which this query should iterate.ScanQuery<K,V>setFilter(@Nullable IgniteBiPredicate<K,V> filter)Sets filter.ScanQuery<K,V>setLocal(boolean loc)Sets whether this query should be executed on local node only.ScanQuery<K,V>setPageSize(int pageSize)Sets optional page size, if0, then default is used.ScanQuery<K,V>setPartition(@Nullable Integer part)Sets partition number over which this query should iterate.StringtoString()- 
Methods inherited from class org.apache.ignite.cache.query.QuerygetPageSize, isLocal, prepare
 
- 
 
- 
- 
- 
Constructor Detail- 
ScanQuerypublic ScanQuery() Create scan query returning all entries.
 - 
ScanQuerypublic ScanQuery(int part) Creates partition scan query returning all entries for given partition.- Parameters:
- part- Partition.
 
 - 
ScanQuerypublic ScanQuery(@Nullable @Nullable IgniteBiPredicate<K,V> filter)Create scan query with filter.- Parameters:
- filter- Filter. If- nullthen all entries will be returned.
 
 - 
ScanQuerypublic ScanQuery(@Nullable @Nullable Integer part, @Nullable @Nullable IgniteBiPredicate<K,V> filter)Create scan query with filter.- Parameters:
- part- Partition.
- filter- Filter. If- nullthen all entries will be returned.
 
 
- 
 - 
Method Detail- 
getFilterpublic IgniteBiPredicate<K,V> getFilter() Gets filter.- Returns:
- Filter.
 
 - 
setFilterpublic ScanQuery<K,V> setFilter(@Nullable @Nullable IgniteBiPredicate<K,V> filter) Sets filter.- Parameters:
- filter- Filter. If- nullthen all entries will be returned.
- Returns:
- thisfor chaining.
 
 - 
setPartitionpublic ScanQuery<K,V> setPartition(@Nullable @Nullable Integer part) Sets partition number over which this query should iterate. Ifnull, query will iterate over all partitions in the cache. Must be in the range [0, N) where N is partition number in the cache.- Parameters:
- part- Partition number over which this query should iterate.
- Returns:
- thisfor chaining.
 
 - 
getPartition@Nullable public @Nullable Integer getPartition() Gets partition number over which this query should iterate. Will returnnullif partition was not set. In this case query will iterate over all partitions in the cache.- Returns:
- Partition number or null.
 
 - 
setPageSizepublic ScanQuery<K,V> setPageSize(int pageSize) Sets optional page size, if0, then default is used.- Overrides:
- setPageSizein class- Query<javax.cache.Cache.Entry<K,V>>
- Parameters:
- pageSize- Optional page size.
- Returns:
- thisfor chaining.
 
 - 
setLocalpublic ScanQuery<K,V> setLocal(boolean loc) Sets whether this query should be executed on local node only.
 
- 
 
-