|
||||||||||
| 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 | |
|---|---|
java.util.concurrent.locks.Lock |
getLock(AdminCommand command)
Return the appropriate Lock object for the specified command. |
java.util.concurrent.locks.Lock |
getLock(AdminCommand command,
java.lang.String owner)
Return the appropriate Lock object for the specified command. |
java.util.concurrent.locks.Lock |
getLock(CommandLock.LockType type)
Return the appropriate Lock object for the specified LockType. |
java.lang.String |
getLockMessage()
Get the message to be returned if the lock could not be acquired. |
java.lang.String |
getLockOwner()
Get the admin user id for the user who acquired the exclusive lock. |
java.util.Date |
getLockTimeOfAcquisition()
Get the time the exclusive lock was acquired. |
boolean |
isSuspended()
Indicates if commands are currently suspended. |
java.lang.Thread |
resumeCommands()
Release the lock allowing the DAS to accept commands. |
AdminCommandLock.SuspendStatus |
suspendCommands(long timeout,
java.lang.String lockOwner)
Lock the DAS from accepting any commands annotated with a SHARED or EXCLUSIVE CommandLock. |
AdminCommandLock.SuspendStatus |
suspendCommands(long timeout,
java.lang.String lockOwner,
java.lang.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 java.util.concurrent.locks.Lock getLock(CommandLock.LockType type)
type - the LockType
public java.util.concurrent.locks.Lock getLock(AdminCommand command)
command - the AdminCommand object
public java.util.concurrent.locks.Lock getLock(AdminCommand command,
java.lang.String owner)
throws AdminCommandLockTimeoutException,
AdminCommandLockException
command - the AdminCommand objectowner - the authority who requested the lock
AdminCommandLockTimeoutException
AdminCommandLockExceptionpublic java.lang.String getLockOwner()
public java.lang.String getLockMessage()
public java.util.Date getLockTimeOfAcquisition()
public boolean isSuspended()
public AdminCommandLock.SuspendStatus suspendCommands(long timeout,
java.lang.String lockOwner)
timeout - lock timeout in secondslockOwner - the user who acquired the lock
public AdminCommandLock.SuspendStatus suspendCommands(long timeout,
java.lang.String lockOwner,
java.lang.String message)
timeout - lock timeout in secondslockOwner - the user who acquired the lockmessage - message to return when a command is blocked
public java.lang.Thread resumeCommands()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||