org.apache.activemq.store.jdbc
Interface DatabaseLocker

All Superinterfaces:
Service
All Known Implementing Classes:
DefaultDatabaseLocker, TransactDatabaseLocker

public interface DatabaseLocker
extends Service

Represents some kind of lock service to ensure that a broker is the only master

Version:
$Revision: $

Method Summary
 boolean keepAlive()
          Used by a timer to keep alive the lock.
 void setLockAcquireSleepInterval(long lockAcquireSleepInterval)
          set the delay interval in milliseconds between lock acquire attempts
 void setPersistenceAdapter(JDBCPersistenceAdapter adapter)
          allow the injection of a jdbc persistence adapter
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Method Detail

setPersistenceAdapter

void setPersistenceAdapter(JDBCPersistenceAdapter adapter)
                           throws IOException
allow the injection of a jdbc persistence adapter

Parameters:
adapter - the persistence adapter to use
Throws:
IOException

keepAlive

boolean keepAlive()
Used by a timer to keep alive the lock. If the method returns false the broker should be terminated


setLockAcquireSleepInterval

void setLockAcquireSleepInterval(long lockAcquireSleepInterval)
set the delay interval in milliseconds between lock acquire attempts

Parameters:
lockAcquireSleepInterval - the sleep interval in miliseconds


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.