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
Redirector
implementation which uses theREDIRECT
config key viaLocalConfig
to know whichNode
is 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 void
chooseNextRedirect(Redirector.Context ctx, java.util.Set<java.lang.String> nodeUuids)
Gives theRedirector
a chance to configure the next appropriate redirect based on theSet
of currentNode
uuids.Glacier2.SessionPrx
getProxyOrNull(Redirector.Context ctx, java.lang.String userId, Glacier2.SessionControlPrx control, Ice.Current current)
Create or retrieve and returns aSessionPrx
which the current method takes control of.void
handleRingShutdown(Redirector.Context ctx, java.lang.String downUuid)
Gives theRedirector
a chance to remove the currentRing
when 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 aSessionPrx
which the current method takes control of. If it is not returned, then it should be properly destroyed.- Specified by:
getProxyOrNull
in interfaceRedirector
- Overrides:
getProxyOrNull
in 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:Redirector
Gives theRedirector
a chance to configure the next appropriate redirect based on theSet
of currentNode
uuids.
-
handleRingShutdown
public void handleRingShutdown(Redirector.Context ctx, java.lang.String downUuid)
Description copied from interface:Redirector
Gives theRedirector
a chance to remove the currentRing
when it is being shutdown.
-
-