ome.services.blitz.redirect
Class ScaleRedirector

java.lang.Object
  extended by ome.services.blitz.redirect.AbstractRedirector
      extended by 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
ScaleRedirector(Executor ex)
           
 
Method Summary
 void chooseNextRedirect(Redirector.Context context, Set<String> nodeUuids)
          Does nothing since all redirects are chosen during Redirector.getProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)
 Glacier2.SessionPrx getProxyOrNull(Redirector.Context ctx, String userId, Glacier2.SessionControlPrx control, Ice.Current current)
          Returns null early if the Current has already once been routed by a Redirector implementation, returns an existing session if it can be found, or returns a null.
 void handleRingShutdown(Redirector.Context context, String uuid)
          Nothing needs to be done on shutdown, since the Ring implementation will properly disable the Node table queried during the next call to Redirector.getProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)
 
Methods inherited from class ome.services.blitz.redirect.AbstractRedirector
alreadyRouted, findProxy, getRedirect, initializeRedirect, nodeProxyQuery, obtainProxy, proxyForSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScaleRedirector

public ScaleRedirector(Executor ex)
Method Detail

getProxyOrNull

public Glacier2.SessionPrx getProxyOrNull(Redirector.Context ctx,
                                          String userId,
                                          Glacier2.SessionControlPrx control,
                                          Ice.Current current)
                                   throws Glacier2.CannotCreateSessionException
Description copied from class: AbstractRedirector
Returns null early if the Current has already once been routed by a Redirector implementation, returns an existing session if it can be found, or returns a null.

Specified by:
getProxyOrNull in interface Redirector
Overrides:
getProxyOrNull in class AbstractRedirector
userId - Not null.
Returns:
Possibly null.
Throws:
Glacier2.CannotCreateSessionException
See Also:
AbstractRedirector.ROUTED_FROM

chooseNextRedirect

public void chooseNextRedirect(Redirector.Context context,
                               Set<String> nodeUuids)
Does nothing since all redirects are chosen during Redirector.getProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)


handleRingShutdown

public void handleRingShutdown(Redirector.Context context,
                               String uuid)
Nothing needs to be done on shutdown, since the Ring implementation will properly disable the Node table queried during the next call to Redirector.getProxyOrNull(Context, String, Glacier2.SessionControlPrx, Ice.Current)



OmeroJava Api

Version: Beta-4.1.1-r5927-b91

Copyright © 2009 The University of Dundee. All Rights Reserved.