Class PackLockImpl
- 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 boolean
lock(String msg)
Create thepack-*.keep
file, with the given message.void
unlock()
Remove the.keep
file that holds a pack in place.
-
-
-
Method Detail
-
lock
public boolean lock(String msg) throws IOException
Create thepack-*.keep
file, 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 IOException
Description copied from interface:PackLock
Remove the.keep
file that holds a pack in place.- Specified by:
unlock
in interfacePackLock
- Throws:
IOException
- if deletion of the.keep
file failed
-
-