public class FilteringIndexStoreStrategy extends java.lang.Object implements IndexStoreStrategy
Constructor and Description |
---|
FilteringIndexStoreStrategy(IndexStoreStrategy strategy,
com.google.common.base.Predicate<java.lang.String> filter) |
FilteringIndexStoreStrategy(IndexStoreStrategy strategy,
com.google.common.base.Predicate<java.lang.String> filter,
boolean readOnly) |
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.
|
void |
update(com.google.common.base.Supplier<NodeBuilder> index,
java.lang.String path,
java.lang.String indexName,
NodeBuilder indexMeta,
java.util.Set<java.lang.String> beforeKeys,
java.util.Set<java.lang.String> afterKeys)
Updates the index for the given path.
|
public FilteringIndexStoreStrategy(IndexStoreStrategy strategy, com.google.common.base.Predicate<java.lang.String> filter)
public FilteringIndexStoreStrategy(IndexStoreStrategy strategy, com.google.common.base.Predicate<java.lang.String> filter, boolean readOnly)
public void update(com.google.common.base.Supplier<NodeBuilder> index, java.lang.String path, java.lang.String indexName, NodeBuilder indexMeta, java.util.Set<java.lang.String> beforeKeys, java.util.Set<java.lang.String> afterKeys) throws CommitFailedException
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 pathCommitFailedException
public 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 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 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 - 2020 Adobe. All Rights Reserved