public class SharedFileLocker extends AbstractLocker
| Modifier and Type | Field and Description |
|---|---|
static File |
DEFAULT_DIRECTORY |
protected File |
directory |
DEFAULT_LOCK_ACQUIRE_SLEEP_INTERVAL, failIfLocked, lockable, lockAcquireSleepInterval, name| Constructor and Description |
|---|
SharedFileLocker() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(PersistenceAdapter persistenceAdapter)
Optionally configure the locker with the persistence adapter currently used
You can use persistence adapter configuration details like, data directory
datasource, etc.
|
void |
doStart() |
void |
doStop(org.apache.activemq.util.ServiceStopper stopper) |
File |
getDirectory() |
boolean |
keepAlive()
Used by a timer to keep alive the lock.
|
void |
setDirectory(File directory) |
getLockAcquireSleepInterval, setFailIfLocked, setLockable, setLockAcquireSleepInterval, setNameaddServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stoppublic static final File DEFAULT_DIRECTORY
public SharedFileLocker()
public void doStart() throws Exception
doStart in class org.apache.activemq.util.ServiceSupportExceptionpublic boolean keepAlive()
LockerkeepAlive in interface LockerkeepAlive in class AbstractLockerpublic void doStop(org.apache.activemq.util.ServiceStopper stopper) throws Exception
doStop in class org.apache.activemq.util.ServiceSupportExceptionpublic File getDirectory()
public void setDirectory(File directory)
public void configure(PersistenceAdapter persistenceAdapter) throws IOException
LockerIOExceptionCopyright © 2005–2020 The Apache Software Foundation. All rights reserved.