|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Locker
Represents a lock service to ensure that a broker is the only master
| Method Summary | |
|---|---|
void |
configure(PersistenceAdapter persistenceAdapter)
Optionally configure the locker with the persistence adapter currently used You can use persistence adapter configuration details like, data directory datasource, etc. |
boolean |
keepAlive()
Used by a timer to keep alive the lock. |
void |
setFailIfLocked(boolean failIfLocked)
Specify whether to fail immediately if the lock is already held. |
void |
setLockAcquireSleepInterval(long lockAcquireSleepInterval)
set the delay interval in milliseconds between lock acquire attempts |
void |
setName(String name)
Set the name of the lock to use. |
| Methods inherited from interface org.apache.activemq.Service |
|---|
start, stop |
| Method Detail |
|---|
boolean keepAlive()
throws IOException
IOExceptionvoid setLockAcquireSleepInterval(long lockAcquireSleepInterval)
lockAcquireSleepInterval - the sleep interval in milisecondsvoid setName(String name)
void setFailIfLocked(boolean failIfLocked)
failIfLocked: - true => fail immediately if the lock is held; false => block until the lock can be obtained
(default).
void configure(PersistenceAdapter persistenceAdapter)
throws IOException
persistenceAdapter -
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||