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 |
---|---|
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.
|
Node |
getManagerByUuid(java.lang.String managerUuid,
ServiceFactory sf)
Retrieves a given manager node.
|
long |
getManagerIdByUuid(java.lang.String managerUuid,
SqlAction sql)
Retrieves a given manager node ID.
|
java.util.Set<java.lang.String> |
getManagerList(boolean onlyActive) |
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, SqlAction sql)
NodeProvider
getManagerIdByUuid
in interface NodeProvider
managerUuid
- manager node UUID to retrievesql
- active SQL context which can be used to make queriespublic Node getManagerByUuid(java.lang.String managerUuid, 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 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 Principal principal()
NodeProvider
principal
in interface NodeProvider
Version: 5.4.6-ice35-b87
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.