Package org.apache.ivy.plugins.lock
Class FileBasedLockStrategy.NIOFileLocker
- java.lang.Object
-
- org.apache.ivy.plugins.lock.FileBasedLockStrategy.NIOFileLocker
-
- All Implemented Interfaces:
FileBasedLockStrategy.FileLocker
- Enclosing class:
- FileBasedLockStrategy
public static class FileBasedLockStrategy.NIOFileLocker extends java.lang.Object implements FileBasedLockStrategy.FileLocker
Locks a file using theFileLockmechanism.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFileBasedLockStrategy.NIOFileLocker.LockData
-
Field Summary
Fields Modifier and Type Field Description private booleandebugLockingprivate java.util.concurrent.ConcurrentMap<java.io.File,FileBasedLockStrategy.NIOFileLocker.LockData>locks
-
Constructor Summary
Constructors Constructor Description NIOFileLocker(boolean debugLocking)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleantryLock(java.io.File file)voidunlock(java.io.File file)
-
-
-
Field Detail
-
locks
private java.util.concurrent.ConcurrentMap<java.io.File,FileBasedLockStrategy.NIOFileLocker.LockData> locks
-
debugLocking
private boolean debugLocking
-
-
Method Detail
-
tryLock
public boolean tryLock(java.io.File file)
- Specified by:
tryLockin interfaceFileBasedLockStrategy.FileLocker
-
unlock
public void unlock(java.io.File file)
- Specified by:
unlockin interfaceFileBasedLockStrategy.FileLocker
-
-