org.apache.activemq.store.jdbc
Class DefaultDatabaseLocker
java.lang.Object
org.apache.activemq.store.jdbc.DefaultDatabaseLocker
- All Implemented Interfaces:
- Service, DatabaseLocker
public class DefaultDatabaseLocker
- extends java.lang.Object
- implements DatabaseLocker
Represents an exclusive lock on a database to avoid multiple brokers
running against the same logical database.
- Version:
- $Revision: $
Method Summary |
boolean |
keepAlive()
Used by a timer to keep alive the lock. |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDatabaseLocker
public DefaultDatabaseLocker(javax.sql.DataSource dataSource,
Statements statements)
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface Service
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Specified by:
stop
in interface Service
- Throws:
java.lang.Exception
keepAlive
public boolean keepAlive()
- Description copied from interface:
DatabaseLocker
- Used by a timer to keep alive the lock.
If the method returns false the broker should be terminated
- Specified by:
keepAlive
in interface DatabaseLocker
Copyright © 2011 Apache Software Foundation. All Rights Reserved.