P
- node providers that adjust according to read-only statuspublic class NodeProviderWrapper<P extends NodeProvider & ReadOnlyStatus.IsAware> extends java.lang.Object implements NodeProvider
Constructor and Description |
---|
NodeProviderWrapper(ReadOnlyStatus readOnly,
java.util.List<P> providers)
Construct a new node provider.
|
Modifier and Type | Method and Description |
---|---|
ome.model.meta.Node |
addManager(java.lang.String managerUuid,
java.lang.String proxyString)
Adds a manager node.
|
int |
closeSessionsForManager(java.lang.String managerUuid)
Closes all sessions for a given manager node.
|
ome.model.meta.Node |
getManagerByUuid(java.lang.String managerUuid,
ome.system.ServiceFactory sf)
Retrieves a given manager node.
|
long |
getManagerIdByUuid(java.lang.String managerUuid,
ome.util.SqlAction sql)
Retrieves a given manager node ID.
|
java.util.Set<java.lang.String> |
getManagerList(boolean onlyActive) |
ome.system.Principal |
principal()
Retrieves the current active principal.
|
void |
setManagerDown(java.lang.String managerUuid)
Sets a given manager node as down.
|
public NodeProviderWrapper(ReadOnlyStatus readOnly, java.util.List<P> providers)
readOnly
- the read-only statusproviders
- the node providers to wrap: the earlier providers are tried first and at least one provider must support
write operations according to ReadOnlyStatus.IsAware.isReadOnly(ReadOnlyStatus)
public java.util.Set<java.lang.String> getManagerList(boolean onlyActive)
getManagerList
in interface NodeProvider
public long getManagerIdByUuid(java.lang.String managerUuid, ome.util.SqlAction sql)
NodeProvider
getManagerIdByUuid
in interface NodeProvider
managerUuid
- manager node UUID to retrievesql
- active SQL context which can be used to make queriespublic ome.model.meta.Node getManagerByUuid(java.lang.String managerUuid, ome.system.ServiceFactory sf)
NodeProvider
getManagerByUuid
in interface NodeProvider
managerUuid
- manager node UUID to retrievesf
- current session's service factorypublic int closeSessionsForManager(java.lang.String managerUuid)
NodeProvider
closeSessionsForManager
in interface NodeProvider
managerUuid
- manager node UUID to close sessions forpublic void setManagerDown(java.lang.String managerUuid)
NodeProvider
setManagerDown
in interface NodeProvider
managerUuid
- manager node UUID to set as downpublic ome.model.meta.Node addManager(java.lang.String managerUuid, java.lang.String proxyString)
NodeProvider
addManager
in interface NodeProvider
managerUuid
- manager node UUID to addproxyString
- manager node proxy connection stringpublic ome.system.Principal principal()
NodeProvider
principal
in interface NodeProvider