public class FileLockManager extends BaseLockManager
| Modifier and Type | Class and Description |
|---|---|
protected static class |
FileLockManager.ByteArrayBuffer |
BaseLockManager.LockDescription| Modifier and Type | Field and Description |
|---|---|
static String |
_rcsid |
protected static int |
BASE_SIZE |
protected static Integer |
lockPoolInitialization |
protected static LockPool |
myFileLocks |
protected File |
synchDirectory |
static String |
synchDirectoryProperty
Synchronization directory property - local to this implementation of ILockManager
|
activePrefix, anonymousServiceNamePrefix, anonymousServiceTypeCounter, globalData, globalFlags, localLocks, localSections, myLocks, mySections, serviceDataPrefix, serviceListPrefix, servicePrefix, serviceTypeLockPrefix, threadID, TYPE_READ, TYPE_WRITE, TYPE_WRITENONEX| Constructor and Description |
|---|
FileLockManager() |
FileLockManager(File synchDirectory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkGlobalFlag(String flagName)
Check the condition of a specified flag.
|
void |
clearGlobalFlag(String flagName)
Clear a flag.
|
protected static String |
getFlagResourceName(String flagName)
Calculate the name of a flag resource.
|
protected LockPool |
getGlobalLockPool()
Override this method to change the nature of global locks.
|
static File |
getSynchDirectoryProperty()
Get the synch directory property.
|
protected String |
makeFilePath(String key)
Create a file path given a key name.
|
byte[] |
readData(String resourceName)
Read data from a shared data resource.
|
void |
setGlobalFlag(String flagName)
Raise a flag.
|
void |
writeData(String resourceName,
byte[] data)
Write data to a shared data resource.
|
buildServiceListEntry, buildServiceTypeLockName, checkServiceActive, cleanupInactiveService, clear, clearLocks, constructUniqueServiceName, countActiveServices, deleteServiceData, endServiceActivity, enter, enterCriticalSections, enterLocks, enterLocksNoWait, enterNonExWrite, enterNonExWriteCriticalSection, enterNonExWriteLock, enterNonExWriteLockNoWait, enterNonExWriteNoWait, enterNoWait, enterRead, enterReadCriticalSection, enterReadLock, enterReadLockNoWait, enterReadNoWait, enterWrite, enterWriteCriticalSection, enterWriteLock, enterWriteLockNoWait, enterWriteNoWait, getSharedConfiguration, getSortedUniqueLocks, leave, leaveCriticalSections, leaveLocks, leaveNonExWrite, leaveNonExWriteCriticalSection, leaveNonExWriteLock, leaveRead, leaveReadCriticalSection, leaveReadLock, leaveWrite, leaveWriteCriticalSection, leaveWriteLock, makeActiveServiceFlagName, makeRegisteredServiceFlagName, makeServiceCounterName, makeServiceDataName, readServiceCounter, readServiceData, readServiceName, registerServiceBeginServiceActivity, registerServiceBeginServiceActivity, retrieveServiceData, scanServiceData, timedWait, updateServiceData, writeServiceCounter, writeServiceData, writeServiceNamepublic static final String _rcsid
public static final String synchDirectoryProperty
protected static final Integer lockPoolInitialization
protected static LockPool myFileLocks
protected File synchDirectory
protected static final int BASE_SIZE
public FileLockManager(File synchDirectory) throws ManifoldCFException
ManifoldCFExceptionpublic FileLockManager()
throws ManifoldCFException
ManifoldCFExceptionpublic static File getSynchDirectoryProperty() throws ManifoldCFException
ManifoldCFExceptionprotected static String getFlagResourceName(String flagName)
flagName - is the name of the flag.public void setGlobalFlag(String flagName) throws ManifoldCFException
setGlobalFlag in interface ILockManagersetGlobalFlag in class BaseLockManagerflagName - is the name of the flag to set.ManifoldCFExceptionpublic void clearGlobalFlag(String flagName) throws ManifoldCFException
clearGlobalFlag in interface ILockManagerclearGlobalFlag in class BaseLockManagerflagName - is the name of the flag to clear.ManifoldCFExceptionpublic boolean checkGlobalFlag(String flagName) throws ManifoldCFException
checkGlobalFlag in interface ILockManagercheckGlobalFlag in class BaseLockManagerflagName - is the name of the flag to check.ManifoldCFExceptionpublic byte[] readData(String resourceName) throws ManifoldCFException
readData in interface ILockManagerreadData in class BaseLockManagerresourceName - is the global name of the resource.ManifoldCFExceptionpublic void writeData(String resourceName, byte[] data) throws ManifoldCFException
writeData in interface ILockManagerwriteData in class BaseLockManagerresourceName - is the global name of the resource.data - is the byte array containing the data. Pass null if you want to delete the resource completely.ManifoldCFExceptionprotected LockPool getGlobalLockPool()
getGlobalLockPool in class BaseLockManager