Class ClusterSearchEngine
- java.lang.Object
-
- com.logicaldoc.core.searchengine.StandardSearchEngine
-
- com.logicaldoc.enterprise.cluster.ClusterSearchEngine
-
- All Implemented Interfaces:
com.logicaldoc.core.searchengine.SearchEngine
,PayloadHandler
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class ClusterSearchEngine extends com.logicaldoc.core.searchengine.StandardSearchEngine implements PayloadHandler, org.springframework.context.ApplicationContextAware
A cluster-aware search engine.- Since:
- 6.5
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description ClusterSearchEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteHit(long id)
void
deleteHits(Collection<Long> ids)
com.logicaldoc.core.searchengine.Hit
getHit(long id)
Object
handle(Payload payload)
Invoked when a new message arrives from the cluster.com.logicaldoc.core.searchengine.Hits
search(String expression, String[] filters, String expressionLanguage, Integer rows)
void
setApplicationContext(org.springframework.context.ApplicationContext context)
Registers this engine as handler for 'index' messages
-
-
-
Method Detail
-
deleteHit
public void deleteHit(long id)
- Specified by:
deleteHit
in interfacecom.logicaldoc.core.searchengine.SearchEngine
- Overrides:
deleteHit
in classcom.logicaldoc.core.searchengine.StandardSearchEngine
-
deleteHits
public void deleteHits(Collection<Long> ids)
- Specified by:
deleteHits
in interfacecom.logicaldoc.core.searchengine.SearchEngine
- Overrides:
deleteHits
in classcom.logicaldoc.core.searchengine.StandardSearchEngine
-
getHit
public com.logicaldoc.core.searchengine.Hit getHit(long id)
- Specified by:
getHit
in interfacecom.logicaldoc.core.searchengine.SearchEngine
- Overrides:
getHit
in classcom.logicaldoc.core.searchengine.StandardSearchEngine
-
search
public com.logicaldoc.core.searchengine.Hits search(String expression, String[] filters, String expressionLanguage, Integer rows)
- Specified by:
search
in interfacecom.logicaldoc.core.searchengine.SearchEngine
- Overrides:
search
in classcom.logicaldoc.core.searchengine.StandardSearchEngine
-
handle
public Object handle(Payload payload) throws Exception
Description copied from interface:PayloadHandler
Invoked when a new message arrives from the cluster.- Specified by:
handle
in interfacePayloadHandler
- Parameters:
payload
- Payload to be processed- Returns:
- The response to the received message
- Throws:
Exception
- a generic error
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException
Registers this engine as handler for 'index' messages- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
-