Package org.alfresco.solr.tracker
Class ComposableDocRouter
- java.lang.Object
-
- org.alfresco.solr.tracker.ComposableDocRouter
-
- All Implemented Interfaces:
DocRouter
- Direct Known Subclasses:
ExplicitShardIdWithDynamicPropertyRouter,ExplicitShardIdWithStaticPropertyRouter
public abstract class ComposableDocRouter extends java.lang.Object implements DocRouter
A ComposableDocRouteris 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 Modifier and Type Field Description protected org.slf4j.Loggerlogger
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddebug(java.lang.String message, java.lang.Object... params)protected java.lang.BooleannegativeReturnValue()Properly 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, wait
-
Methods inherited from interface org.alfresco.solr.tracker.DocRouter
getProperties, routeAcl, routeNode
-
-
-
-
Method Detail
-
negativeReturnValue
protected java.lang.Boolean 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
protected void debug(java.lang.String message, java.lang.Object... params)
-
-