
public class RemoteAgentLockService extends AbstractAgentLockServiceDelegate
agentLevelListeners, agentLevels, agentLockUpdateListeners, heldLocks, levelListenersSemaphore, lockLevelUpdate, lockListenersSemaphore, log, svc| Constructor and Description |
|---|
RemoteAgentLockService(AgentLockService svc) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,AgentLock> |
getLocks() |
void |
lockAgent(String agentName) |
void |
preInit() |
void |
preStart() |
void |
setLevelForAgent(String agentName,
int level)
Set this agent's operational level for the given subsystem.
|
void |
unlockAgent(String agentName) |
boolean |
validateLock(AgentLock lock) |
addAgentLevelListener, addAgentLockUpdateListener, connected, getAgent, getAgentStateService, getAllWorkerAgents, getHeldLocks, getLevelForAgent, getLockableAgents, getLockedAgents, getLockForAgent, notifyLevelListeners, notifyLockListeners, removeAgentLevelListener, removeAgentLockUpdateListener, setLevelInternal, setLockInternalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnecting, disconnected, disconnectingpublic RemoteAgentLockService(AgentLockService svc)
public void preInit()
preInit in interface AgentLockServiceDelegatepreInit in class AbstractAgentLockServiceDelegatepublic void preStart()
public void setLevelForAgent(String agentName, int level) throws UnauthorizedLevelException, UnauthorizedLockException, IOException
AgentLockServiceDelegateAgentLevelListener will be notified with the new level valueagentName - the subsystem for which to change the levellevel - the level to setUnauthorizedLevelException - if the requested level cannot be set. This happens if this agent
owns a lock on the given subsystem and that lock defines a
maximum level that is lower than the requested level, or if this
agent does not hold a lock on the given subsystem and this
agent's default subsystem level is lower than the requested
level.UnauthorizedLockException - if the user is not allowed to acquire a lock on the specified
AgentIOException - if there was a communication problem on the buses.public void lockAgent(String agentName) throws UnauthorizedLockException, IOException
UnauthorizedLockExceptionIOExceptionpublic void unlockAgent(String agentName) throws IOException
IOExceptionpublic boolean validateLock(AgentLock lock)
Copyright © 2019 LSST. All rights reserved.