Package ome.services.blitz.redirect
Class ScaleRedirector
- java.lang.Object
-
- ome.services.blitz.redirect.AbstractRedirector
-
- ome.services.blitz.redirect.ScaleRedirector
-
- All Implemented Interfaces:
Redirector
public class ScaleRedirector extends AbstractRedirector
Planned implementation (NYI): will use the "Node.scale" column to randomly choose a target.- 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 ScaleRedirector(ome.services.util.Executor ex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
chooseNextRedirect(Redirector.Context context, java.util.Set<java.lang.String> nodeUuids)
Does nothing since all redirects are chosen duringgetProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)
Glacier2.SessionPrx
getProxyOrNull(Redirector.Context ctx, java.lang.String userId, Glacier2.SessionControlPrx control, Ice.Current current)
Returns null early if theCurrent
has already once been routed by aRedirector
implementation, returns an existing session if it can be found, or returns a null.void
handleRingShutdown(Redirector.Context context, java.lang.String uuid)
Nothing needs to be done on shutdown, since the Ring implementation will properly disable theNode
table queried during the next call togetProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)
-
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
Description copied from class:AbstractRedirector
Returns null early if theCurrent
has already once been routed by aRedirector
implementation, returns an existing session if it can be found, or returns a null.- Specified by:
getProxyOrNull
in interfaceRedirector
- Overrides:
getProxyOrNull
in classAbstractRedirector
userId
- Not null.- Returns:
- Possibly null.
- Throws:
Glacier2.CannotCreateSessionException
- See Also:
AbstractRedirector.ROUTED_FROM
-
chooseNextRedirect
public void chooseNextRedirect(Redirector.Context context, java.util.Set<java.lang.String> nodeUuids)
Does nothing since all redirects are chosen duringgetProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)
-
handleRingShutdown
public void handleRingShutdown(Redirector.Context context, java.lang.String uuid)
Nothing needs to be done on shutdown, since the Ring implementation will properly disable theNode
table queried during the next call togetProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)
-
-