org.jboss.dna.graph.search
Class AbstractSearchEngine<WorkspaceType extends SearchEngineWorkspace,ProcessorType extends SearchEngineProcessor>
java.lang.Object
org.jboss.dna.graph.search.AbstractSearchEngine<WorkspaceType,ProcessorType>
- Type Parameters:
WorkspaceType
- the workspace typeProcessorType
- the processor type
- All Implemented Interfaces:
- SearchEngine
- Direct Known Subclasses:
- AbstractLuceneSearchEngine
@ThreadSafe
public abstract class AbstractSearchEngine<WorkspaceType extends SearchEngineWorkspace,ProcessorType extends SearchEngineProcessor>
- extends Object
- implements SearchEngine
A component that acts as a search engine for the content within a single RepositorySource
. This engine manages a set of
indexes and provides search functionality for each of the workspaces within the source, and provides various methods to
(re)index the content contained with source's workspaces and keep the indexes up-to-date via changes.
DEFAULT_VERIFY_WORKSPACE_IN_SOURCE
public static final boolean DEFAULT_VERIFY_WORKSPACE_IN_SOURCE
- See Also:
- Constant Field Values
getSourceName
public String getSourceName()
- Get the name of the source that can be searched with an engine that uses this provider.
- Specified by:
getSourceName
in interface SearchEngine
- Returns:
- the name of the source that is to be searchable; never null
- See Also:
SearchEngine.getSourceName()
isVerifyWorkspaceInSource
public boolean isVerifyWorkspaceInSource()
- Determine whether the workspaces should be verified with the original source before creating indexes for them.
- Returns:
- true if verification should be performed, or false otherwise
createProcessor
public SearchEngineProcessor createProcessor(ExecutionContext context,
Observer observer,
boolean readOnly)
- Create the
SearchEngineProcessor
implementation that can be used to operate against the
SearchEngineWorkspace
instances.
Note that the resulting processor must be closed
by the caller when completed.
- Specified by:
createProcessor
in interface SearchEngine
- Parameters:
context
- the context in which the processor is to be used; never nullobserver
- the observer of any events created by the processor; may be nullreadOnly
- true if the processor will only be reading or searching, or false if the processor will be used to update
the workspaces
- Returns:
- the processor; may not be null
- See Also:
SearchEngine.createProcessor(org.jboss.dna.graph.ExecutionContext,
org.jboss.dna.graph.observe.Observer, boolean)
Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.