public class UniqueEntryStoreStrategy extends java.lang.Object implements IndexStoreStrategy
/test/node
, the index
structure will be /oak:index/index/@key
:Constructor and Description |
---|
UniqueEntryStoreStrategy() |
UniqueEntryStoreStrategy(java.lang.String indexName) |
UniqueEntryStoreStrategy(java.lang.String indexName,
@NotNull java.util.function.Consumer<NodeBuilder> insertCallback) |
Modifier and Type | Method and Description |
---|---|
long |
count(Filter filter,
NodeState root,
NodeState indexMeta,
java.util.Set<java.lang.String> values,
int max)
Count the occurrence of a given set of values.
|
long |
count(NodeState root,
NodeState indexMeta,
java.util.Set<java.lang.String> values,
int max)
Count the occurrence of a given set of values.
|
boolean |
exists(com.google.common.base.Supplier<NodeBuilder> index,
java.lang.String key)
Check whether an entry for the given key exists.
|
java.lang.String |
getIndexNodeName() |
java.lang.Iterable<java.lang.String> |
query(Filter filter,
java.lang.String indexName,
NodeState indexMeta,
java.lang.Iterable<java.lang.String> values)
Search for a given set of values.
|
java.lang.Iterable<IndexEntry> |
queryEntries(Filter filter,
java.lang.String indexName,
NodeState indexMeta,
java.lang.Iterable<java.lang.String> values)
Search for a given set of values, returning IndexEntry results
|
void |
update(com.google.common.base.Supplier<NodeBuilder> index,
java.lang.String path,
@Nullable java.lang.String indexName,
@Nullable NodeBuilder indexMeta,
java.util.Set<java.lang.String> beforeKeys,
java.util.Set<java.lang.String> afterKeys)
Updates the index for the given path.
|
public UniqueEntryStoreStrategy()
public UniqueEntryStoreStrategy(java.lang.String indexName)
public UniqueEntryStoreStrategy(java.lang.String indexName, @NotNull @NotNull java.util.function.Consumer<NodeBuilder> insertCallback)
public void update(com.google.common.base.Supplier<NodeBuilder> index, java.lang.String path, @Nullable @Nullable java.lang.String indexName, @Nullable @Nullable NodeBuilder indexMeta, java.util.Set<java.lang.String> beforeKeys, java.util.Set<java.lang.String> afterKeys)
IndexStoreStrategy
update
in interface IndexStoreStrategy
index
- 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 java.lang.Iterable<java.lang.String> query(Filter filter, java.lang.String indexName, NodeState indexMeta, java.lang.Iterable<java.lang.String> values)
IndexStoreStrategy
query
in interface IndexStoreStrategy
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)public java.lang.Iterable<IndexEntry> queryEntries(Filter filter, java.lang.String indexName, NodeState indexMeta, java.lang.Iterable<java.lang.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)java.lang.UnsupportedOperationException
- if the operation is not supportedpublic boolean exists(com.google.common.base.Supplier<NodeBuilder> index, java.lang.String key)
IndexStoreStrategy
exists
in interface IndexStoreStrategy
index
- the index node supplierkey
- the keypublic long count(NodeState root, NodeState indexMeta, java.util.Set<java.lang.String> values, int max)
IndexStoreStrategy
count
in interface IndexStoreStrategy
root
- 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, java.util.Set<java.lang.String> values, int max)
IndexStoreStrategy
count
in interface IndexStoreStrategy
filter
- 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 java.lang.String getIndexNodeName()
getIndexNodeName
in interface IndexStoreStrategy
Copyright © 2010 - 2023 Adobe. All Rights Reserved