public class UniqueEntryStoreStrategy extends Object implements IndexStoreStrategy
/test/node, the index
structure will be /oak:index/index/@key:| Constructor and Description |
|---|
UniqueEntryStoreStrategy() |
UniqueEntryStoreStrategy(String indexName) |
UniqueEntryStoreStrategy(String indexName,
@NotNull Consumer<NodeBuilder> insertCallback) |
| Modifier and Type | Method and Description |
|---|---|
long |
count(Filter filter,
NodeState root,
NodeState indexMeta,
Set<String> values,
int max)
Count the occurrence of a given set of values.
|
long |
count(NodeState root,
NodeState indexMeta,
Set<String> values,
int max)
Count the occurrence of a given set of values.
|
boolean |
exists(Supplier<NodeBuilder> index,
String key)
Check whether an entry for the given key exists.
|
String |
getIndexNodeName() |
Iterable<String> |
query(Filter filter,
String indexName,
NodeState indexMeta,
Iterable<String> values)
Search for a given set of values.
|
Iterable<IndexEntry> |
queryEntries(Filter filter,
String indexName,
NodeState indexMeta,
Iterable<String> values)
Search for a given set of values, returning IndexEntry results
|
void |
update(Supplier<NodeBuilder> index,
String path,
@Nullable String indexName,
@Nullable NodeBuilder indexMeta,
Set<String> beforeKeys,
Set<String> afterKeys)
Updates the index for the given path.
|
public UniqueEntryStoreStrategy()
public UniqueEntryStoreStrategy(String indexName)
public UniqueEntryStoreStrategy(String indexName, @NotNull @NotNull Consumer<NodeBuilder> insertCallback)
public void update(Supplier<NodeBuilder> index, String path, @Nullable @Nullable String indexName, @Nullable @Nullable NodeBuilder indexMeta, Set<String> beforeKeys, Set<String> afterKeys)
IndexStoreStrategyupdate in interface IndexStoreStrategyindex - the index node supplierpath - path stored in the indexindexName - the name of the index. May be null.indexMeta - the definition of the index. May be null.beforeKeys - keys that no longer apply to the pathafterKeys - keys that now do apply to the pathpublic Iterable<String> query(Filter filter, String indexName, NodeState indexMeta, Iterable<String> values)
IndexStoreStrategyquery in interface IndexStoreStrategyfilter - the filter (can optionally be used for optimized query execution)indexName - the name of the index (for logging)indexMeta - the index metadata node (may not be null)values - values to look for (null to check for property existence)public Iterable<IndexEntry> queryEntries(Filter filter, String indexName, NodeState indexMeta, Iterable<String> values)
filter - the filter (can optionally be used for optimized query execution)indexName - the name of the index (for logging)indexMeta - the index metadata node (may not be null)values - values to look for (null to check for property existence)UnsupportedOperationException - if the operation is not supportedpublic boolean exists(Supplier<NodeBuilder> index, String key)
IndexStoreStrategyexists in interface IndexStoreStrategyindex - the index node supplierkey - the keypublic long count(NodeState root, NodeState indexMeta, Set<String> values, int max)
IndexStoreStrategycount in interface IndexStoreStrategyroot - the root node (may not be null)indexMeta - the index metadata node (may not be null)values - values to look for (null to check for property existence)max - the maximum value to returnpublic long count(Filter filter, NodeState root, NodeState indexMeta, Set<String> values, int max)
IndexStoreStrategycount in interface IndexStoreStrategyfilter - the filter which can be used to estimate better costroot - the root node (may not be null)indexMeta - the index metadata node (may not be null)values - values to look for (null to check for property existence)max - the maximum value to returnpublic String getIndexNodeName()
getIndexNodeName in interface IndexStoreStrategyCopyright © 2010 - 2020 Adobe. All Rights Reserved