org.apache.activemq.broker
Interface Lockable

All Known Implementing Classes:
DataSourceServiceSupport, org.apache.activemq.leveldb.replicated.ElectingLevelDBStore, JDBCPersistenceAdapter, JournalPersistenceAdapterFactory, KahaDBPersistenceAdapter, LevelDBPersistenceAdapter, org.apache.activemq.leveldb.LevelDBStore, LockableServiceSupport, MultiKahaDBPersistenceAdapter, PersistenceAdapterFactoryBean, org.apache.activemq.leveldb.replicated.ProxyLevelDBStore, ReplicatedLevelDBPersistenceAdapter

public interface Lockable

A lockable broker resource. Uses Locker to guarantee that only single instance is running


Method Summary
 Locker createDefaultLocker()
          Create a default locker
 long getLockKeepAlivePeriod()
           
 void setLocker(Locker locker)
          Set locker to be used
 void setLockKeepAlivePeriod(long lockKeepAlivePeriod)
          Period (in milliseconds) on which Locker.keepAlive() should be checked
 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 -

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 which Locker.keepAlive() should be checked

Parameters:
lockKeepAlivePeriod -

getLockKeepAlivePeriod

long getLockKeepAlivePeriod()


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.