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, 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() |
void |
setDirectory(java.io.File directory) |
keepAlive, setFailIfLocked, setLockAcquireSleepInterval, setName
addServiceListener, dispose, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stop
public static final java.io.File DEFAULT_DIRECTORY
protected java.io.File directory
public void doStart() throws java.lang.Exception
doStart
in class ServiceSupport
java.lang.Exception
public void doStop(ServiceStopper stopper) throws java.lang.Exception
doStop
in class ServiceSupport
java.lang.Exception
public java.io.File getDirectory()
public void setDirectory(java.io.File directory)
public void configure(PersistenceAdapter persistenceAdapter) throws java.io.IOException
Locker
java.io.IOException
Copyright © 2005-2013 Red Hat, Inc.. All Rights Reserved.