Package org.apache.activemq.broker
Interface Lockable
-
- All Known Implementing Classes:
AbstractKahaDBStore
,DataSourceServiceSupport
,JDBCPersistenceAdapter
,JobSchedulerStoreImpl
,JournalPersistenceAdapterFactory
,KahaDBPersistenceAdapter
,LockableServiceSupport
,MultiKahaDBPersistenceAdapter
,PersistenceAdapterFactoryBean
public interface Lockable
A lockable broker resource. UsesLocker
to guarantee that only single instance is running
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Locker
createDefaultLocker()
Create a default lockerlong
getLockKeepAlivePeriod()
void
setLocker(Locker locker)
Set locker to be usedvoid
setLockKeepAlivePeriod(long lockKeepAlivePeriod)
Period (in milliseconds) on whichLocker.keepAlive()
should be checkedvoid
setStopOnError(boolean stopOnError)
Stop the broker if the locker get an exception while processing lock.void
setUseLock(boolean useLock)
Turn locking on/off on the resource
-
-
-
Method Detail
-
setUseLock
void setUseLock(boolean useLock)
Turn locking on/off on the resource- Parameters:
useLock
-
-
setStopOnError
void setStopOnError(boolean stopOnError)
Stop the broker if the locker get an exception while processing lock.- Parameters:
stopOnError
-
-
createDefaultLocker
Locker createDefaultLocker() throws IOException
Create a default locker- Returns:
- default locker
- Throws:
IOException
-
setLocker
void setLocker(Locker locker) throws IOException
Set locker to be used- Parameters:
locker
-- Throws:
IOException
-
setLockKeepAlivePeriod
void setLockKeepAlivePeriod(long lockKeepAlivePeriod)
Period (in milliseconds) on whichLocker.keepAlive()
should be checked- Parameters:
lockKeepAlivePeriod
-
-
getLockKeepAlivePeriod
long getLockKeepAlivePeriod()
-
-