|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.api.admin.AdminCommandLock
@Service @Scoped(value=org.jvnet.hk2.component.Singleton.class) public class AdminCommandLock
The implementation of the admin command lock.
| Nested Class Summary | |
|---|---|
static class |
AdminCommandLock.SuspendStatus
The status of a suspend command attempt. |
| Constructor Summary | |
|---|---|
AdminCommandLock()
|
|
| Method Summary | |
|---|---|
Lock |
getLock(AdminCommand command)
Return the appropriate Lock object for the specified command. |
Lock |
getLock(AdminCommand command,
String owner)
Return the appropriate Lock object for the specified command. |
Lock |
getLock(CommandLock.LockType type)
Return the appropriate Lock object for the specified LockType. |
String |
getLockMessage()
Get the message to be returned if the lock could not be acquired. |
String |
getLockOwner()
Get the admin user id for the user who acquired the exclusive lock. |
Date |
getLockTimeOfAcquisition()
Get the time the exclusive lock was acquired. |
boolean |
isSuspended()
Indicates if commands are currently suspended. |
Thread |
resumeCommands()
Release the lock allowing the DAS to accept commands. |
AdminCommandLock.SuspendStatus |
suspendCommands(long timeout,
String lockOwner)
Lock the DAS from accepting any commands annotated with a SHARED or EXCLUSIVE CommandLock. |
AdminCommandLock.SuspendStatus |
suspendCommands(long timeout,
String lockOwner,
String message)
Lock the DAS from accepting any commands annotated with a SHARED or EXCLUSIVE CommandLock. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AdminCommandLock()
| Method Detail |
|---|
public Lock getLock(CommandLock.LockType type)
type - the LockType
public Lock getLock(AdminCommand command)
command - the AdminCommand object
public Lock getLock(AdminCommand command,
String owner)
throws AdminCommandLockTimeoutException,
AdminCommandLockException
command - the AdminCommand objectowner - the authority who requested the lock
AdminCommandLockTimeoutException
AdminCommandLockExceptionpublic String getLockOwner()
public String getLockMessage()
public Date getLockTimeOfAcquisition()
public boolean isSuspended()
public AdminCommandLock.SuspendStatus suspendCommands(long timeout,
String lockOwner)
timeout - lock timeout in secondslockOwner - the user who acquired the lock
public AdminCommandLock.SuspendStatus suspendCommands(long timeout,
String lockOwner,
String message)
timeout - lock timeout in secondslockOwner - the user who acquired the lockmessage - message to return when a command is blocked
public Thread resumeCommands()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||