public class CompositeIndexWriter extends Object implements IndexWriter
Modifier and Type | Class and Description |
---|---|
protected static class |
CompositeIndexWriter.Context |
IndexWriter.IndexingContext
Modifier | Constructor and Description |
---|---|
protected |
CompositeIndexWriter(List<IndexWriter> writers) |
Modifier and Type | Method and Description |
---|---|
void |
addBinaryToIndex(Binary binary,
IndexWriter.IndexingContext txnCtx) |
void |
addToIndex(String workspace,
NodeKey key,
Path path,
Name primaryType,
Set<Name> mixinTypes,
Iterator<Property> propertiesIterator,
NodeTypeSchemata schemata,
IndexWriter.IndexingContext txnCtx)
Add to the index the information about a node.
|
boolean |
canBeSkipped()
Flag that defines whether this index may be skipped.
|
void |
clearAllIndexes()
Clear all indexes of content.
|
static IndexWriter |
create(Iterable<IndexProvider> providers) |
IndexWriter.IndexingContext |
createIndexingContext(Transaction txn)
Create a new indexing context in which a set of indexing operations will be performed.
|
void |
removeBinariesFromIndex(Iterable<String> sha1s,
IndexWriter.IndexingContext txnCtx) |
void |
removeFromIndex(String workspace,
Iterable<NodeKey> keys,
IndexWriter.IndexingContext txnCtx) |
void |
updateIndex(String workspace,
NodeKey key,
Path path,
Name primaryType,
Set<Name> mixinTypes,
Iterator<Property> properties,
NodeTypeSchemata schemata,
IndexWriter.IndexingContext txnCtx)
Update the index to reflect the new state of the node.
|
protected CompositeIndexWriter(List<IndexWriter> writers)
public static IndexWriter create(Iterable<IndexProvider> providers)
public IndexWriter.IndexingContext createIndexingContext(Transaction txn)
IndexWriter
createIndexingContext
in interface IndexWriter
txn
- the transaction that this context is to participate inpublic void clearAllIndexes()
IndexWriter
clearAllIndexes
in interface IndexWriter
public boolean canBeSkipped()
IndexWriter
canBeSkipped
in interface IndexWriter
public void addToIndex(String workspace, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, Iterator<Property> propertiesIterator, NodeTypeSchemata schemata, IndexWriter.IndexingContext txnCtx)
IndexWriter
addToIndex
in interface IndexWriter
workspace
- 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 emptypropertiesIterator
- the iterator over the properties of a node; may not be null but may be emptyschemata
- the node type schemata that should be used to determine how the node is to be indexed; may not be nulltxnCtx
- the transaction context in which the index updates should be made; may not be nullpublic void updateIndex(String workspace, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, Iterator<Property> properties, NodeTypeSchemata schemata, IndexWriter.IndexingContext txnCtx)
IndexWriter
updateIndex
in interface IndexWriter
workspace
- 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 emptyschemata
- the node type schemata that should be used to determine how the node is to be indexed; may not be nulltxnCtx
- the transaction context in which the index updates should be made; may not be nullpublic void removeFromIndex(String workspace, Iterable<NodeKey> keys, IndexWriter.IndexingContext txnCtx)
removeFromIndex
in interface IndexWriter
public void addBinaryToIndex(Binary binary, IndexWriter.IndexingContext txnCtx)
addBinaryToIndex
in interface IndexWriter
public void removeBinariesFromIndex(Iterable<String> sha1s, IndexWriter.IndexingContext txnCtx)
removeBinariesFromIndex
in interface IndexWriter
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.