Package org.apache.activemq.store.jdbc
Class AbstractJDBCLocker
java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.broker.AbstractLocker
org.apache.activemq.store.jdbc.AbstractJDBCLocker
- All Implemented Interfaces:
Locker,org.apache.activemq.Service
- Direct Known Subclasses:
DefaultDatabaseLocker,LeaseDatabaseLocker
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected DataSourceprotected JDBCPersistenceAdapterprotected intFields inherited from class org.apache.activemq.broker.AbstractLocker
DEFAULT_LOCK_ACQUIRE_SLEEP_INTERVAL, failIfLocked, lockable, lockAcquireSleepInterval, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclose(Connection connection) protected voidvoidconfigure(PersistenceAdapter adapter) protected Connectionintprotected StatementsvoidpreStart()voidsetCreateTablesOnStartup(boolean createTablesOnStartup) voidsetDataSource(DataSource dataSource) voidsetQueryTimeout(int queryTimeout) protected voidsetQueryTimeout(Statement statement) voidsetStatements(Statements statements) Methods inherited from class org.apache.activemq.broker.AbstractLocker
getLockAcquireSleepInterval, keepAlive, setFailIfLocked, setLockable, setLockAcquireSleepInterval, setNameMethods inherited from class org.apache.activemq.util.ServiceSupport
addServiceListener, dispose, doStart, doStop, isStarted, isStopped, isStopping, postStop, removeServiceListener, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.Service
start, stop
-
Field Details
-
dataSource
-
jdbcAdapter
-
createTablesOnStartup
protected boolean createTablesOnStartup -
queryTimeout
protected int queryTimeout
-
-
Constructor Details
-
AbstractJDBCLocker
public AbstractJDBCLocker()
-
-
Method Details
-
configure
- Throws:
IOException
-
getStatements
-
setDataSource
-
setStatements
-
setQueryTimeout
- Throws:
SQLException
-
getQueryTimeout
public int getQueryTimeout() -
setQueryTimeout
public void setQueryTimeout(int queryTimeout) -
setCreateTablesOnStartup
public void setCreateTablesOnStartup(boolean createTablesOnStartup) -
getConnection
- Throws:
SQLException
-
close
-
close
-
preStart
public void preStart()- Overrides:
preStartin classServiceSupport
-