public abstract class AbstractQueryHandler extends Object implements QueryHandler
QueryHandler
.Modifier and Type | Field and Description |
---|---|
protected FileSystem |
fs
Search index file system, or
null |
Constructor and Description |
---|
AbstractQueryHandler() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this
QueryHandler and frees resources attached
to this handler. |
protected abstract void |
doInit()
This method must be implemented by concrete sub classes and will be
called from
init(org.apache.jackrabbit.core.fs.FileSystem, org.apache.jackrabbit.core.query.QueryHandlerContext) . |
QueryHandlerContext |
getContext()
Returns the context for this query handler.
|
String |
getIdleTime() |
String |
getOnWorkspaceInconsistency() |
OnWorkspaceInconsistency |
getOnWorkspaceInconsistencyHandler() |
String |
getQueryClass() |
void |
init(FileSystem fs,
QueryHandlerContext context)
Initializes this query handler by setting all properties in this class
with appropriate parameter values.
|
void |
setIdleTime(String idleTime)
Deprecated.
This parameter is not supported any more.
Please use 'maxIdleTime' in the repository configuration.
|
void |
setOnWorkspaceInconsistency(String name)
Sets the
OnWorkspaceInconsistency handler with the given name. |
void |
setQueryClass(String queryClass)
Sets the name of the query class to use.
|
void |
updateNodes(Iterator<NodeId> remove,
Iterator<NodeState> add)
This default implementation calls the individual
#deleteNode(org.apache.jackrabbit.core.NodeId)
and QueryHandler.addNode(org.apache.jackrabbit.core.state.NodeState) methods
for each entry in the iterators. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addNode, createExecutableQuery, deleteNode, getWeaklyReferringNodes
protected FileSystem fs
null
public final void init(FileSystem fs, QueryHandlerContext context) throws IOException
init
in interface QueryHandler
fs
- search index file system, or null
context
- the context for this query handler.IOException
- if an error occurs during initialization.public void close() throws IOException
QueryHandler
QueryHandler
and frees resources attached
to this handler.close
in interface QueryHandler
IOException
protected abstract void doInit() throws IOException
init(org.apache.jackrabbit.core.fs.FileSystem, org.apache.jackrabbit.core.query.QueryHandlerContext)
.IOException
- If an error occurs.public QueryHandlerContext getContext()
getContext
in interface QueryHandler
QueryHandlerContext
instance for this
QueryHandler
.public void updateNodes(Iterator<NodeId> remove, Iterator<NodeState> add) throws javax.jcr.RepositoryException, IOException
#deleteNode(org.apache.jackrabbit.core.NodeId)
and QueryHandler.addNode(org.apache.jackrabbit.core.state.NodeState)
methods
for each entry in the iterators. First the nodes to remove are processed
then the nodes to add.updateNodes
in interface QueryHandler
remove
- uuids of nodes to remove.add
- NodeStates to add.javax.jcr.RepositoryException
- if an error occurs while indexing a node.IOException
- if an error occurs while updating the index.public OnWorkspaceInconsistency getOnWorkspaceInconsistencyHandler()
OnWorkspaceInconsistency
handler.public void setOnWorkspaceInconsistency(String name)
OnWorkspaceInconsistency
handler with the given name.
Currently the valid names are:
fail
log
name
- the name of a OnWorkspaceInconsistency
handler.public String getOnWorkspaceInconsistency()
OnWorkspaceInconsistency
.public void setQueryClass(String queryClass)
queryClass
- the name of the query class to use.public String getQueryClass()
getQueryClass
in interface QueryHandler
public void setIdleTime(String idleTime)
idleTime
- the query handler idle time.public String getIdleTime()
Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.