org.apache.activemq.store.jdbc
Class DefaultDatabaseLocker
java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.broker.AbstractLocker
org.apache.activemq.store.jdbc.AbstractJDBCLocker
org.apache.activemq.store.jdbc.DefaultDatabaseLocker
- All Implemented Interfaces:
- Locker, org.apache.activemq.Service
- Direct Known Subclasses:
- TransactDatabaseLocker
public class DefaultDatabaseLocker
- extends AbstractJDBCLocker
Represents an exclusive lock on a database to avoid multiple brokers running
against the same logical database.
| Methods inherited from class org.apache.activemq.store.jdbc.AbstractJDBCLocker |
close, close, configure, getConnection, getQueryTimeout, preStart, setCreateTablesOnStartup, setDataSource, setQueryTimeout, setQueryTimeout, setStatements |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.activemq.Service |
start, stop |
lockCreateStatement
protected volatile PreparedStatement lockCreateStatement
lockUpdateStatement
protected volatile PreparedStatement lockUpdateStatement
connection
protected volatile Connection connection
exceptionHandler
protected Handler<Exception> exceptionHandler
DefaultDatabaseLocker
public DefaultDatabaseLocker()
doStart
public void doStart()
throws Exception
- Specified by:
doStart in class ServiceSupport
- Throws:
Exception
doStop
public void doStop(ServiceStopper stopper)
throws Exception
- Specified by:
doStop in class ServiceSupport
- Throws:
Exception
keepAlive
public boolean keepAlive()
throws IOException
- Specified by:
keepAlive in interface Locker- Overrides:
keepAlive in class AbstractLocker
- Throws:
IOException
getLockAcquireSleepInterval
public long getLockAcquireSleepInterval()
- Overrides:
getLockAcquireSleepInterval in class AbstractLocker
setLockAcquireSleepInterval
public void setLockAcquireSleepInterval(long lockAcquireSleepInterval)
- Specified by:
setLockAcquireSleepInterval in interface Locker- Overrides:
setLockAcquireSleepInterval in class AbstractLocker
getExceptionHandler
public Handler getExceptionHandler()
setExceptionHandler
public void setExceptionHandler(Handler exceptionHandler)
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.