public class PackLock
extends java.lang.Object
PackFile
's associated .keep
file.Constructor and Description |
---|
PackLock(java.io.File packFile,
FS fs)
Create a new lock for a pack file.
|
public PackLock(java.io.File packFile, FS fs)
packFile
- location of the pack-*.pack
file.fs
- the filesystem abstraction used by the repository.public boolean lock(java.lang.String msg) throws java.io.IOException
pack-*.keep
file, with the given message.msg
- message to store in the file.java.io.IOException
- the keep file could not be written.public void unlock() throws java.io.IOException
.keep
file that holds this pack in place.java.io.IOException
- if deletion of .keep file failedCopyright © 2012. All Rights Reserved.