Class PackFileSnapshot
java.lang.Object
org.eclipse.jgit.internal.storage.file.FileSnapshot
org.eclipse.jgit.internal.storage.file.PackFileSnapshot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AnyObjectId
private static final ObjectId
private boolean
Fields inherited from class org.eclipse.jgit.internal.storage.file.FileSnapshot
DIRTY, MISSING_FILE, UNKNOWN_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
isChecksumChanged
(File packFile) boolean
isModified
(File packFile) Check if the path may have been modified since the snapshot was saved.private AnyObjectId
readChecksum
(File packFile) static PackFileSnapshot
Record a snapshot for a specific packfile path.(package private) void
setChecksum
(AnyObjectId checksum) toString()
(package private) boolean
Methods inherited from class org.eclipse.jgit.internal.storage.file.FileSnapshot
equals, equals, hashCode, lastDelta, lastModified, lastModifiedInstant, lastRacyThreshold, save, save, saveNoConfig, setClean, size, waitUntilNotRacy, wasFileKeyChanged, wasLastModifiedChanged, wasLastModifiedRacilyClean, wasSizeChanged
-
Field Details
-
MISSING_CHECKSUM
-
checksum
-
wasChecksumChanged
private boolean wasChecksumChanged
-
-
Constructor Details
-
PackFileSnapshot
PackFileSnapshot(File packFile)
-
-
Method Details
-
save
Record a snapshot for a specific packfile path.This method should be invoked before the packfile is accessed.
- Parameters:
path
- the path to later remember. The path's current status information is saved.- Returns:
- the snapshot.
-
setChecksum
-
isModified
Check if the path may have been modified since the snapshot was saved.- Overrides:
isModified
in classFileSnapshot
- Parameters:
packFile
- the path the snapshot describes.- Returns:
- true if the path needs to be read again.
-
isChecksumChanged
-
readChecksum
-
wasChecksumChanged
boolean wasChecksumChanged() -
toString
Description copied from class:FileSnapshot
- Overrides:
toString
in classFileSnapshot
-