public abstract class IndexChangeAdapter extends ChangeSetAdapter
ChangeSetAdapter.NodeTypePredicate
Modifier and Type | Field and Description |
---|---|
protected ProvidedIndex<?> |
index |
protected Logger |
logger |
protected String |
workspaceName |
context, predicate
Modifier | Constructor and Description |
---|---|
protected |
IndexChangeAdapter(ExecutionContext context,
String workspaceName,
ChangeSetAdapter.NodeTypePredicate predicate,
ProvidedIndex<?> index) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearDataFor(NodeKey key) |
protected void |
completeChanges()
Signals the end of processing for the changes in a transaction described by a single
ChangeSet . |
protected void |
completeWorkspaceChanges()
Signals the end of processing for the workspace-related changes in a transaction described by a single
ChangeSet . |
protected boolean |
includesWorkspace(String workspaceName)
Determine whether changes in the named workspace should be processed.
|
protected <T> ProvidedIndex<T> |
index() |
protected static String |
nodeKey(NodeKey key) |
protected boolean |
reindex(String workspaceName,
NodeKey key,
Path path,
Name primaryType,
Set<Name> mixinTypes,
CachedNode.Properties properties,
boolean queryable)
Reindex the specific node.
|
String |
toString() |
addNode, addWorkspace, beginChanges, beginWorkspaceChanges, binaryValueUnused, changeNode, modifyProperties, moveNode, notify, reindexNode, removeNode, removeWorkspace, renameNode, reorderNode, repositoryMetadataChanged, sequenced, sequenceFailure
protected final String workspaceName
protected final ProvidedIndex<?> index
protected final Logger logger
protected IndexChangeAdapter(ExecutionContext context, String workspaceName, ChangeSetAdapter.NodeTypePredicate predicate, ProvidedIndex<?> index)
protected boolean includesWorkspace(String workspaceName)
ChangeSetAdapter
true
, which
means changes to content in all workspaces are handled by this adapter.includesWorkspace
in class ChangeSetAdapter
workspaceName
- the workspace that has changes in contentprotected final boolean reindex(String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, CachedNode.Properties properties, boolean queryable)
workspaceName
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullpath
- the path of the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyproperties
- the properties of the node; may not be null but may be emptyqueryable
- true if the node is queryable, false otherwisetrue
if the reindexing operation took place, or false
if no reindexing was performed because
the ChangeSetAdapter.predicate
failed.protected void clearDataFor(NodeKey key)
protected <T> ProvidedIndex<T> index()
protected void completeChanges()
ChangeSetAdapter
ChangeSet
.completeChanges
in class ChangeSetAdapter
ChangeSetAdapter.beginChanges()
protected void completeWorkspaceChanges()
ChangeSetAdapter
ChangeSet
.completeWorkspaceChanges
in class ChangeSetAdapter
ChangeSetAdapter.beginWorkspaceChanges()
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.