public class DefaultDatabaseLocker extends AbstractJDBCLocker
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
connection |
protected Handler<Exception> |
exceptionHandler |
protected PreparedStatement |
lockCreateStatement |
protected PreparedStatement |
lockUpdateStatement |
createTablesOnStartup, dataSource, jdbcAdapter, queryTimeoutDEFAULT_LOCK_ACQUIRE_SLEEP_INTERVAL, failIfLocked, lockable, lockAcquireSleepInterval, name| Constructor and Description |
|---|
DefaultDatabaseLocker() |
| Modifier and Type | Method and Description |
|---|---|
void |
doStart() |
void |
doStop(ServiceStopper stopper) |
Handler |
getExceptionHandler() |
long |
getLockAcquireSleepInterval() |
boolean |
keepAlive() |
void |
setExceptionHandler(Handler exceptionHandler) |
void |
setLockAcquireSleepInterval(long lockAcquireSleepInterval) |
close, close, configure, getConnection, getQueryTimeout, getStatements, preStart, setCreateTablesOnStartup, setDataSource, setQueryTimeout, setQueryTimeout, setStatementssetFailIfLocked, setLockable, setNameaddServiceListener, dispose, isStarted, isStopped, isStopping, postStop, removeServiceListener, start, stopprotected volatile PreparedStatement lockCreateStatement
protected volatile PreparedStatement lockUpdateStatement
protected volatile Connection connection
protected Handler<Exception> exceptionHandler
public DefaultDatabaseLocker()
public void doStart() throws Exception
doStart in class ServiceSupportExceptionpublic void doStop(ServiceStopper stopper) throws Exception
doStop in class ServiceSupportExceptionpublic boolean keepAlive() throws IOException
keepAlive in interface LockerkeepAlive in class AbstractLockerIOExceptionpublic long getLockAcquireSleepInterval()
getLockAcquireSleepInterval in class AbstractLockerpublic void setLockAcquireSleepInterval(long lockAcquireSleepInterval)
setLockAcquireSleepInterval in interface LockersetLockAcquireSleepInterval in class AbstractLockerpublic Handler getExceptionHandler()
public void setExceptionHandler(Handler exceptionHandler)
Copyright © 2005–2016 The Apache Software Foundation. All rights reserved.