Class ClusterSearchEngine
- java.lang.Object
-
- com.logicaldoc.core.searchengine.StandardSearchEngine
-
- com.logicaldoc.enterprise.cluster.ClusterSearchEngine
-
- All Implemented Interfaces:
com.logicaldoc.core.searchengine.SearchEngine
,PayloadHandler
,EventListener
,org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
public class ClusterSearchEngine extends com.logicaldoc.core.searchengine.StandardSearchEngine implements PayloadHandler, org.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
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.void
onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
com.logicaldoc.core.searchengine.Hits
search(String expression, String[] filters, String expressionLanguage, Integer rows)
-
-
-
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
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ApplicationContextEvent event)
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ApplicationContextEvent>
-
-