Package ubic.gemma.core.util.locking
Class FileLockInfo
java.lang.Object
ubic.gemma.core.util.locking.FileLockInfo
Metadata about a file lock.
- Author:
- poirigui
-
Constructor Summary
ConstructorsConstructorDescriptionFileLockInfo(Path path, Path lockfilePath, int readHoldCount, int readLockCount, int writeHoldCount, boolean isWriteLocked, int channelHoldCount, List<FileLockInfo> procInfo) Creates a newFileLockInfoinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintNumber of reentrant holds on theFileChannel.Path being locked, which is usuallygetPath()with a.locksuffix.getPath()Path subject to locking.Process-level information about the file lock.intintintinthashCode()booleantoString()
-
Constructor Details
-
FileLockInfo
public FileLockInfo(Path path, Path lockfilePath, int readHoldCount, int readLockCount, int writeHoldCount, boolean isWriteLocked, int channelHoldCount, List<FileLockInfo> procInfo) Creates a newFileLockInfoinstance.- Parameters:
path- Path subject to locking.lockfilePath- Path being locked, which is usuallygetPath()with a.locksuffix.readHoldCount- @see ReentrantReadWriteLock#getReadHoldCount()readLockCount- @see ReentrantReadWriteLock#getReadLockCount()writeHoldCount- @see ReentrantReadWriteLock#getWriteHoldCount()isWriteLocked- @see ReentrantReadWriteLock#isWriteLocked()channelHoldCount- Number of reentrant holds on theFileChannel.When that number goes down to zero, the channel is closed.
procInfo- Process-level information about the file lock.
-
-
Method Details
-
getPath
Path subject to locking. -
getLockfilePath
Path being locked, which is usuallygetPath()with a.locksuffix. -
getReadHoldCount
public int getReadHoldCount()- See Also:
-
getReadLockCount
public int getReadLockCount()- See Also:
-
getWriteHoldCount
public int getWriteHoldCount()- See Also:
-
isWriteLocked
public boolean isWriteLocked()- See Also:
-
getChannelHoldCount
public int getChannelHoldCount()Number of reentrant holds on theFileChannel.When that number goes down to zero, the channel is closed.
-
getProcInfo
Process-level information about the file lock. -
equals
-
hashCode
public int hashCode() -
toString
-