public class Ring extends omero.grid._ClusterNodeDisp implements Redirector.Context
BlitzConfiguration
objects which manages lookups
of sessions and other resources from all the blitzes which take part in the
cluster. Membership in the Ring
is based on a single token --
"omero.instance" -- retrieved from the current context, or if missing, a
calculated value which will prevent this instance from taking part in
clustering.
The Ring
also listens forModifier and Type | Field and Description |
---|---|
Principal |
principal |
String |
uuid
UUID for this cluster node.
|
Constructor and Description |
---|
Ring(String uuid,
Executor executor) |
Ring(String uuid,
Executor executor,
Redirector redirector) |
Modifier and Type | Method and Description |
---|---|
void |
assertNodes(Set<String> nodeUuids) |
Set<String> |
checkCluster()
Method called during initialization to get all the active uuids within
the cluster, and remove any dead nodes.
|
boolean |
checkPassword(String userId)
Currently only returns false since if the regular password check
performed by
SessionManager cannot find the
session, then the cluster has no extra information. |
void |
destroy() |
void |
down(String downUuid,
Ice.Current __current)
Called when any node goes down.
|
Ice.Communicator |
getCommunicator()
Active communicator for use by the
Redirector instance. |
String |
getDirectProxy()
Returns the proxy information for the local
SessionManager . |
Set<String> |
getManagerList(boolean onlyActive)
Return all known managers in the current cluster context, possibly
filtering out the inactive ones.
|
String |
getNodeUuid(Ice.Current __current) |
Glacier2.SessionPrx |
getProxyOrNull(String userId,
Glacier2.SessionControlPrx control,
Ice.Current current)
Delegates to the
redirector strategy configured for this
instance. |
void |
init(Ice.ObjectAdapter adapter,
String directProxy)
Typically called from within
BlitzConfiguration after the
communicator and adapter have been properly setup. |
Set<String> |
knownManagers() |
Principal |
principal()
Principal instance which can be used for internal calls the
Executor. |
protected void |
purgeNode(String manager) |
void |
setRegistry(Registry registry)
Sets the
Registry for this instance. |
String |
uuid()
The UUID for the local node which will be used as the redirect lookup
string for this
Redirector.Context . |
___down, ___getNodeUuid, __dispatch, __readImpl, __writeImpl, down, getNodeUuid, ice_copyStateFrom, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId
___ice_id, ___ice_ids, ___ice_isA, ___ice_ping, __checkMode, __collocDispatch, __read, __read, __readImpl, __write, __write, __writeImpl, clone, ice_dispatch, ice_dispatch, ice_operationAttributes, ice_ping, ice_ping, ice_postUnmarshal, ice_preMarshal
public final String uuid
public final Principal principal
public Ring(String uuid, Executor executor, Redirector redirector)
public void setRegistry(Registry registry)
Registry
for this instance. This is currently done in
BlitzConfiguration
public String uuid()
Redirector.Context
Redirector.Context
.uuid
in interface Redirector.Context
public Principal principal()
Redirector.Context
Principal
instance which can be used for internal calls the
Executor.principal
in interface Redirector.Context
public String getDirectProxy()
SessionManager
.getDirectProxy
in interface Redirector.Context
public Ice.Communicator getCommunicator()
Redirector.Context
Redirector
instance.getCommunicator
in interface Redirector.Context
public void init(Ice.ObjectAdapter adapter, String directProxy)
BlitzConfiguration
after the
communicator and adapter have been properly setup.public Set<String> checkCluster()
public void destroy()
public String getNodeUuid(Ice.Current __current)
getNodeUuid
in interface omero.grid._ClusterNodeOperations
public void down(String downUuid, Ice.Current __current)
down
in interface omero.grid._ClusterNodeOperations
public boolean checkPassword(String userId)
SessionManager
cannot find the
session, then the cluster has no extra information.public Glacier2.SessionPrx getProxyOrNull(String userId, Glacier2.SessionControlPrx control, Ice.Current current) throws Glacier2.CannotCreateSessionException
redirector
strategy configured for this
instance.Glacier2.CannotCreateSessionException
protected void purgeNode(String manager)
public Set<String> getManagerList(boolean onlyActive)
Redirector.Context
getManagerList
in interface Redirector.Context
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.