public class ManagedLocalIndex extends Object implements ManagedIndex
Filter.Results
Modifier and Type | Method and Description |
---|---|
long |
estimateCardinality(Constraint constraint,
Map<String,Object> variables)
Compute the cost applying the given constraint.
|
long |
estimateTotalCount()
Get the estimated number of entries within this index.
|
Filter.Results |
filter(IndexConstraints constraints)
Return a
Filter.Results instance from which ModeShape can obtain the nodes that satisfy the supplied constraints. |
IndexChangeAdapter |
getIndexChangeAdapter()
Get the ChangeSetAdapter implementation through which changes to content are sent to the index.
|
void |
removeAll()
Remove all of the index entries from the index.
|
void |
shutdown(boolean destroyed)
Shut down this index and release all runtime resources.
|
public long estimateTotalCount()
Costable
estimateTotalCount
in interface Costable
public long estimateCardinality(Constraint constraint, Map<String,Object> variables)
Costable
estimateCardinality
in interface Costable
constraint
- the constraint; never nullvariables
- the bound variables for the query that is being costed; never nullpublic Filter.Results filter(IndexConstraints constraints)
Filter
Filter.Results
instance from which ModeShape can obtain the nodes that satisfy the supplied constraints. This
method should return quickly, since no work (or at least very little work) should be done. All of the work should be
performed when the Filter.Results.getNextBatch(ResultWriter, int)
method is called on the results.public IndexChangeAdapter getIndexChangeAdapter()
ManagedIndex
ChangeSetListener
that is registered on the event bus and kept throughout the lifetime of the index (even if there
are changes), and that listener delegates to this adapter.getIndexChangeAdapter
in interface ManagedIndex
public void shutdown(boolean destroyed)
ManagedIndex
destroyed
is true
, then this index has been
removed from the repository and will not be reused; thus all persistent resources should also be released. If
destroyed
is false
, then this repository is merely shutting down and the index's persistent resources
should be kept so that they are available when the repository is restarted.shutdown
in interface ManagedIndex
destroyed
- true if this index is being permanently removed from the repository and all runtime and persistent
resources can/should be released and cleaned up, or false if the repository is being shutdown and this index will be
needed the next time the repository is startedpublic void removeAll()
ManagedIndex
removeAll
in interface ManagedIndex
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.