org.eclipse.tesla.aether.concurrency
Interface FileLockManager

All Known Implementing Classes:
DefaultFileLockManager

public interface FileLockManager

A LockManager holding external locks, locking files between OS processes (e.g. via FileLockManager.Lock.

Author:
Benjamin Hanzelmann

Nested Class Summary
static interface FileLockManager.Lock
          This lock object adds the ability to directly access the contents of the locked file.
 
Method Summary
 FileLockManager.Lock readLock(File target)
          Obtain a lock object that may be used to lock the target file for reading.
 FileLockManager.Lock writeLock(File target)
          Obtain a lock object that may be used to lock the target file for writing.
 

Method Detail

readLock

FileLockManager.Lock readLock(File target)
Obtain a lock object that may be used to lock the target file for reading. This method must not lock that file right immediately (see FileLockManager.Lock.lock()).

Parameters:
target - the file to lock, never null.
Returns:
a lock object, never null.

writeLock

FileLockManager.Lock writeLock(File target)
Obtain a lock object that may be used to lock the target file for writing. This method must not lock that file right immediately (see FileLockManager.Lock.lock()).

Parameters:
target - the file to lock, never null.
Returns:
a lock object, never null.


Copyright © 2010-2012. All Rights Reserved.