Package ome.services.blitz.redirect
Class ConfigRedirector
- java.lang.Object
-
- ome.services.blitz.redirect.AbstractRedirector
-
- ome.services.blitz.redirect.ConfigRedirector
-
- All Implemented Interfaces:
Redirector
public class ConfigRedirector extends AbstractRedirector
Redirectorimplementation which uses theREDIRECTconfig key viaLocalConfigto know whichNodeis currently active.- Since:
- Beta-4.0-RC2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ome.services.blitz.redirect.Redirector
Redirector.Context
-
-
Field Summary
-
Fields inherited from class ome.services.blitz.redirect.AbstractRedirector
executor, log, ROUTED_FROM
-
-
Constructor Summary
Constructors Constructor Description ConfigRedirector(ome.services.util.Executor ex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchooseNextRedirect(Redirector.Context ctx, java.util.Set<java.lang.String> nodeUuids)Gives theRedirectora chance to configure the next appropriate redirect based on theSetof currentNodeuuids.Glacier2.SessionPrxgetProxyOrNull(Redirector.Context ctx, java.lang.String userId, Glacier2.SessionControlPrx control, Ice.Current current)Create or retrieve and returns aSessionPrxwhich the current method takes control of.voidhandleRingShutdown(Redirector.Context ctx, java.lang.String downUuid)Gives theRedirectora chance to remove the currentRingwhen it is being shutdown.-
Methods inherited from class ome.services.blitz.redirect.AbstractRedirector
alreadyRouted, findProxy, getRedirect, initializeRedirect, nodeProxyQuery, obtainProxy, proxyForSession
-
-
-
-
Method Detail
-
getProxyOrNull
public Glacier2.SessionPrx getProxyOrNull(Redirector.Context ctx, java.lang.String userId, Glacier2.SessionControlPrx control, Ice.Current current) throws Glacier2.CannotCreateSessionException
Create or retrieve and returns aSessionPrxwhich the current method takes control of. If it is not returned, then it should be properly destroyed.- Specified by:
getProxyOrNullin interfaceRedirector- Overrides:
getProxyOrNullin classAbstractRedirector- Parameters:
userId- Not null.control-current-- Returns:
- Possibly null.
- Throws:
Glacier2.CannotCreateSessionException- See Also:
AbstractRedirector.ROUTED_FROM
-
chooseNextRedirect
public void chooseNextRedirect(Redirector.Context ctx, java.util.Set<java.lang.String> nodeUuids)
Description copied from interface:RedirectorGives theRedirectora chance to configure the next appropriate redirect based on theSetof currentNodeuuids.
-
handleRingShutdown
public void handleRingShutdown(Redirector.Context ctx, java.lang.String downUuid)
Description copied from interface:RedirectorGives theRedirectora chance to remove the currentRingwhen it is being shutdown.
-
-