Package org.alfresco.solr.tracker
Class ComposableDocRouter
java.lang.Object
org.alfresco.solr.tracker.ComposableDocRouter
- All Implemented Interfaces:
DocRouter
- Direct Known Subclasses:
ExplicitShardIdWithDynamicPropertyRouter,ExplicitShardIdWithStaticPropertyRouter
A Composable
DocRouter is a document router that can be used standalone or nested in a primary-fallback
composite document routing strategy.
The main reason why we need this marker supertype is because the return value is different depending on how the
document router is used:
- Standalone or leaf in a primary-fallback chain: the method will return true (node accepted) or false (node not accepted)
-
Primary routing strategy in a composite primary-fallback chain:
the method will return true/false if the node is accepted/refused and null
if a failure is met. In this way the
DocRouterWithFallbackcan route the request to the fallback strategy.
- Author:
- agazzarini
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected BooleanProperly handles the return value of this doc router.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.solr.tracker.DocRouter
getProperties, routeAcl, routeNode
-
Field Details
-
logger
protected final org.slf4j.Logger logger
-
-
Method Details
-
negativeReturnValue
Properly handles the return value of this doc router. The return value is different depending on how the document router is used:- Standalone or leaf in a primary-fallback chain: the method will return true (node accepted) or false (node not accepted)
-
Primary routing strategy in a composite primary-fallback chain:
the method will return true/false if the node is accepted/refused and null
if a failure is met. In this way the
DocRouterWithFallbackcan route the request to the fallback strategy.
- Returns:
- true/false or true/exception depending on the active mode of this router.
-
debug
-