public class SharedFileLocker extends AbstractLocker
| Modifier and Type | Field and Description |
|---|---|
static java.io.File |
DEFAULT_DIRECTORY |
protected java.io.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(ServiceStopper stopper) |
java.io.File |
getDirectory() |
boolean |
keepAlive()
Used by a timer to keep alive the lock.
|
void |
setDirectory(java.io.File directory) |
getLockAcquireSleepInterval, setFailIfLocked, setLockable, setLockAcquireSleepInterval, setNameaddServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stoppublic static final java.io.File DEFAULT_DIRECTORY
protected java.io.File directory
public void doStart()
throws java.lang.Exception
doStart in class ServiceSupportjava.lang.Exceptionpublic boolean keepAlive()
LockerkeepAlive in interface LockerkeepAlive in class AbstractLockerpublic void doStop(ServiceStopper stopper) throws java.lang.Exception
doStop in class ServiceSupportjava.lang.Exceptionpublic java.io.File getDirectory()
public void setDirectory(java.io.File directory)
public void configure(PersistenceAdapter persistenceAdapter) throws java.io.IOException
Lockerjava.io.IOExceptionCopyright © 2005-2014 Red Hat, Inc.. All Rights Reserved.