public class ScanSearchProvider extends Object implements SearchProvider, FilterDimensionRows
| Constructor and Description | 
|---|
ScanSearchProvider()
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
clearDimension()
Clears the dimension cache, and resets the indices, effectively resetting the SearchProvider to a clean state. 
 | 
TreeSet<DimensionRow> | 
containsFilterOperation(TreeSet<DimensionRow> dimensionRows,
                       ApiFilter filter)
Contains filter operation. 
 | 
Pagination<DimensionRow> | 
findAllDimensionRowsPaged(PaginationParameters paginationParameters)
Return the desired page of dimension rows. 
 | 
TreeSet<DimensionRow> | 
findAllOrderedDimensionRows()
Getter for dimension rows in tree set for consistent order. 
 | 
DimensionRow | 
findDimensionRowByKeyValue(String value)
Get a dimension row given an id. 
 | 
Pagination<DimensionRow> | 
findFilteredDimensionRowsPaged(Set<ApiFilter> filters,
                              PaginationParameters paginationParameters)
Return the desired page of dimension rows that match the specified filters. 
 | 
int | 
getDimensionCardinality()
Gets the number of distinct dimension rows (assuming the key field is unique) in the index. 
 | 
TreeSet<DimensionRow> | 
inFilterOperation(TreeSet<DimensionRow> dimensionRows,
                 ApiFilter filter)
In-filter operation. 
 | 
boolean | 
isHealthy()
Method to check if search provider is healthy. 
 | 
TreeSet<DimensionRow> | 
notinFilterOperation(TreeSet<DimensionRow> dimensionRows,
                    ApiFilter filter)
Notin-filter operation. 
 | 
void | 
refreshIndex(Map<String,HashDataCache.Pair<DimensionRow,DimensionRow>> changedRows)
Method to add / update indexes. 
 | 
void | 
refreshIndex(String rowId,
            DimensionRow dimensionRow,
            DimensionRow dimensionRowOld)
Method to add / update indexes. 
 | 
void | 
setDimension(Dimension dimension)
Setter for dimension. 
 | 
void | 
setKeyValueStore(KeyValueStore keyValueStore)
Setter for store. 
 | 
TreeSet<DimensionRow> | 
startswithFilterOperation(TreeSet<DimensionRow> dimensionRows,
                         ApiFilter filter)
Startswith-filter operation. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindAllDimensionRows, findFilteredDimensionRows, hasAnyRows, replaceIndexpublic void setDimension(Dimension dimension)
SearchProvidersetDimension in interface SearchProviderdimension - Dimension the SearchProvider is searchingpublic void setKeyValueStore(KeyValueStore keyValueStore)
SearchProvidersetKeyValueStore in interface SearchProviderkeyValueStore - KeyValueStore that holds the data rows indexed by the Search Providerpublic int getDimensionCardinality()
SearchProvidergetDimensionCardinality in interface SearchProviderpublic DimensionRow findDimensionRowByKeyValue(String value)
value - dimension id to look uppublic TreeSet<DimensionRow> findAllOrderedDimensionRows()
SearchProviderfindAllOrderedDimensionRows in interface SearchProviderpublic boolean isHealthy()
SearchProviderisHealthy in interface SearchProviderpublic void clearDimension()
SearchProviderclearDimension in interface SearchProviderpublic void refreshIndex(String rowId, DimensionRow dimensionRow, DimensionRow dimensionRowOld)
SearchProviderrefreshIndex in interface SearchProviderrowId - Unique ID for the dimension rowdimensionRow - New, updated dimension rowdimensionRowOld - Old dimension row if we're updating one, or null if there is no row for the rowIdpublic void refreshIndex(Map<String,HashDataCache.Pair<DimensionRow,DimensionRow>> changedRows)
SearchProviderrefreshIndex in interface SearchProviderchangedRows - Collection of newRow / oldRow pairs keyed by rowId to update the index with. Each row is a
 pair of dimension rows (newRow is the key, oldRow is the value), with the rowId (ie. unique key in the dimension)
 as the top-level Map key.public TreeSet<DimensionRow> inFilterOperation(TreeSet<DimensionRow> dimensionRows, ApiFilter filter)
FilterDimensionRowsinFilterOperation in interface FilterDimensionRowsdimensionRows - The unfiltered set of dimension rowsfilter - The api filter to be applied to the dimension rowspublic TreeSet<DimensionRow> notinFilterOperation(TreeSet<DimensionRow> dimensionRows, ApiFilter filter)
FilterDimensionRowsnotinFilterOperation in interface FilterDimensionRowsdimensionRows - The unfiltered set of dimension rowsfilter - The api filter to be applied to the dimension rowspublic TreeSet<DimensionRow> startswithFilterOperation(TreeSet<DimensionRow> dimensionRows, ApiFilter filter)
FilterDimensionRowsstartswithFilterOperation in interface FilterDimensionRowsdimensionRows - The unfiltered set of dimension rowsfilter - The api filter to be applied to the dimension rowspublic TreeSet<DimensionRow> containsFilterOperation(TreeSet<DimensionRow> dimensionRows, ApiFilter filter)
containsFilterOperation in interface FilterDimensionRowsdimensionRows - The unfiltered set of dimension rowsfilter - The api filterpublic Pagination<DimensionRow> findAllDimensionRowsPaged(PaginationParameters paginationParameters)
SearchProviderfindAllDimensionRowsPaged in interface SearchProviderpaginationParameters - The parameters that define a page (i.e. the number of rows per page,
 and the page of results desired)public Pagination<DimensionRow> findFilteredDimensionRowsPaged(Set<ApiFilter> filters, PaginationParameters paginationParameters)
SearchProviderfindFilteredDimensionRowsPaged in interface SearchProviderfilters - ApiFilters to use for finding matching dimension rowspaginationParameters - The parameters that define a page (i.e. the number of rows per page,
 and the page of results desired)
 Throws TimeoutException If the search times out.Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.