public class ContentMirrorStoreStrategy extends java.lang.Object implements IndexStoreStrategy
/test/node, the index
structure will be /oak:index/index/test/node:
/
test
node
oak:index
index
test
node
| Modifier and Type | Field and Description |
|---|---|
static int |
TRAVERSING_WARN
logging a warning every
oak.traversing.warn traversed nodes. |
| Constructor and Description |
|---|
ContentMirrorStoreStrategy() |
ContentMirrorStoreStrategy(java.lang.String indexName) |
ContentMirrorStoreStrategy(java.lang.String indexName,
java.lang.String pathPrefix,
boolean prependPathPrefix)
Constructs a ContentMirrorStoreStrategy
|
| 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 name,
NodeState indexMeta,
java.lang.Iterable<java.lang.String> values)
Search for a given set of values.
|
java.lang.Iterable<java.lang.String> |
query(Filter filter,
java.lang.String indexName,
NodeState indexMeta,
java.lang.String indexStorageNodeName,
java.lang.Iterable<java.lang.String> values) |
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 static final int TRAVERSING_WARN
oak.traversing.warn traversed nodes. Default 10000public ContentMirrorStoreStrategy()
public ContentMirrorStoreStrategy(java.lang.String indexName)
public ContentMirrorStoreStrategy(java.lang.String indexName,
java.lang.String pathPrefix,
boolean prependPathPrefix)
indexName - name of sub node under which paths are storedpathPrefix - path of the index in repository. Defaults to empty for indexes at root nodes i.e.
those stored directly under '/oak:index'. For non root index its the path excluding
the '/oak:index' node. For e.g. for index at '/content/oak:index/fooIndex' the
pathPrefix would be '/content'.
If this is appened to the paths returned by index then they would become absolute
path in repositoryprependPathPrefix - Should the path prefix be added to the query resultpublic 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)
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 java.lang.Iterable<java.lang.String> query(Filter filter, java.lang.String indexName, NodeState indexMeta, java.lang.String indexStorageNodeName, java.lang.Iterable<java.lang.String> values)
public java.lang.Iterable<java.lang.String> query(Filter filter, java.lang.String name, NodeState indexMeta, java.lang.Iterable<java.lang.String> values)
IndexStoreStrategyquery in interface IndexStoreStrategyfilter - the filter (can optionally be used for optimized query execution)name - 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)
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, java.util.Set<java.lang.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 boolean exists(com.google.common.base.Supplier<NodeBuilder> index, java.lang.String key)
IndexStoreStrategyexists in interface IndexStoreStrategyindex - the index node supplierkey - the keypublic java.lang.String getIndexNodeName()
getIndexNodeName in interface IndexStoreStrategyCopyright © 2010 - 2023 Adobe. All Rights Reserved