Class PackLock
java.lang.Object
org.eclipse.jgit.internal.storage.file.PackLock
Keeps track of a
Pack
's
associated .keep
file.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
keepFile
-
-
Constructor Details
-
PackLock
Create a new lock for a pack file.- Parameters:
packFile
- location of thepack-*.pack
file.fs
- the filesystem abstraction used by the repository.
-
-
Method Details
-
lock
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
Remove the.keep
file that holds this pack in place.- Throws:
IOException
- if deletion of .keep file failed
-