Class PackLockImpl
java.lang.Object
org.eclipse.jgit.internal.storage.file.PackLockImpl
- All Implemented Interfaces:
PackLock
Keeps track of a
Pack
's
associated .keep
file.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
keepFile
-
-
Constructor Details
-
PackLockImpl
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
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
-