- java.lang.Object
-
- org.eclipse.jgit.internal.storage.file.PackLockImpl
-
-
Constructor Summary
Constructors Constructor Description PackLockImpl(File packFile, FS fs)Create a new lock for a pack file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanlock(String msg)Create thepack-*.keepfile, with the given message.voidunlock()Remove the.keepfile that holds a pack in place.
-
-
-
Method Detail
-
lock
public boolean lock(String msg) throws IOException
Create thepack-*.keepfile, with the given message.- Parameters:
msg- message to store in the file.- Returns:
- true if the keep file was successfully written; false otherwise.
- Throws:
IOException- the keep file could not be written.
-
unlock
public void unlock() throws IOExceptionDescription copied from interface:PackLockRemove the.keepfile that holds a pack in place.- Specified by:
unlockin interfacePackLock- Throws:
IOException- if deletion of the.keepfile failed
-
-