Interface KeyStatisticsIndex<A,O>
-
- All Superinterfaces:
Index<O>
,ModificationListener<O>
- All Known Subinterfaces:
KeyStatisticsAttributeIndex<A,O>
,SortedKeyStatisticsAttributeIndex<A,O>
,SortedKeyStatisticsIndex<A,O>
- All Known Implementing Classes:
CompoundIndex
,DiskIndex
,HashIndex
,NavigableIndex
,OffHeapIndex
,PartialDiskIndex
,PartialNavigableIndex
,PartialOffHeapIndex
,PartialSortedKeyStatisticsAttributeIndex
,PartialSQLiteIndex
,SimplifiedSQLiteIndex
,SQLiteDiskIdentityIndex
,SQLiteIdentityIndex
,SQLiteIndex
,SQLiteOffHeapIdentityIndex
public interface KeyStatisticsIndex<A,O> extends Index<O>
An index which allows the set of distinct keys to be queried, and which can return statistics on the number of objects stored in the buckets for each key. Note that this interface reads statistics about keys and NOT about attribute values from the index. Often those statistics will be the same, however if aQuantizer
is configured for an index, then often objects for several attribute values may have the same key and may be stored in the same bucket. Created by niall.gallagher on 09/01/2015.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Integer
getCountForKey(A key, QueryOptions queryOptions)
Integer
getCountOfDistinctKeys(QueryOptions queryOptions)
Returns the count of distinct keys in the index.CloseableIterable<A>
getDistinctKeys(QueryOptions queryOptions)
CloseableIterable<KeyValue<A,O>>
getKeysAndValues(QueryOptions queryOptions)
Returns the keys and corresponding values for those keys in the index.CloseableIterable<KeyStatistics<A>>
getStatisticsForDistinctKeys(QueryOptions queryOptions)
Returns the statisticsKeyStatistics
for all distinct keys in the index-
Methods inherited from interface com.googlecode.cqengine.index.Index
getEffectiveIndex, isMutable, isQuantized, retrieve, supportsQuery
-
-
-
-
Method Detail
-
getDistinctKeys
CloseableIterable<A> getDistinctKeys(QueryOptions queryOptions)
- Parameters:
queryOptions
- Optional parameters for the query- Returns:
- The distinct keys in the index
-
getCountForKey
Integer getCountForKey(A key, QueryOptions queryOptions)
- Parameters:
key
- A key which may be contained in the indexqueryOptions
- Optional parameters for the query- Returns:
- The number of objects stored in the bucket in the index with the given key
-
getCountOfDistinctKeys
Integer getCountOfDistinctKeys(QueryOptions queryOptions)
Returns the count of distinct keys in the index.- Parameters:
queryOptions
- Optional parameters for the query- Returns:
- The count of distinct keys in the index.
-
getStatisticsForDistinctKeys
CloseableIterable<KeyStatistics<A>> getStatisticsForDistinctKeys(QueryOptions queryOptions)
Returns the statisticsKeyStatistics
for all distinct keys in the index- Parameters:
queryOptions
- Optional parameters for the query- Returns:
- The statistics
KeyStatistics
for all distinct keys in the index
-
getKeysAndValues
CloseableIterable<KeyValue<A,O>> getKeysAndValues(QueryOptions queryOptions)
Returns the keys and corresponding values for those keys in the index. Note the same key will be returned multiple times if more than one object has the same key. Also the same value might be returned multiple times, each time for a different key, if the index is built on a multi-value attribute.- Parameters:
queryOptions
- Optional parameters for the query- Returns:
- The keys and corresponding values for those keys in the index
-
-