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.DefaultDatabaseLocker
- All Implemented Interfaces:
- Locker, Service
- Direct Known Subclasses:
- TransactDatabaseLocker
public class DefaultDatabaseLocker
- extends AbstractLocker
Represents an exclusive lock on a database to avoid multiple brokers running
against the same logical database.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataSource
protected javax.sql.DataSource dataSource
statements
protected Statements statements
lockCreateStatement
protected volatile java.sql.PreparedStatement lockCreateStatement
lockUpdateStatement
protected volatile java.sql.PreparedStatement lockUpdateStatement
connection
protected volatile java.sql.Connection connection
stopping
protected volatile boolean stopping
exceptionHandler
protected Handler<java.lang.Exception> exceptionHandler
queryTimeout
protected int queryTimeout
DefaultDatabaseLocker
public DefaultDatabaseLocker()
configure
public void configure(PersistenceAdapter adapter)
throws java.io.IOException
- Throws:
java.io.IOException
doStart
public void doStart()
throws java.lang.Exception
- Specified by:
doStart in class ServiceSupport
- Throws:
java.lang.Exception
doStop
public void doStop(ServiceStopper stopper)
throws java.lang.Exception
- Specified by:
doStop in class ServiceSupport
- Throws:
java.lang.Exception
keepAlive
public boolean keepAlive()
throws java.io.IOException
- Specified by:
keepAlive in interface Locker- Overrides:
keepAlive in class AbstractLocker
- Throws:
java.io.IOException
getLockAcquireSleepInterval
public long getLockAcquireSleepInterval()
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)
getQueryTimeout
public int getQueryTimeout()
setQueryTimeout
public void setQueryTimeout(int queryTimeout)
Copyright © 2005-2015 Red Hat, Inc.. All Rights Reserved.