Class PackFileSnapshot
- java.lang.Object
-
- org.eclipse.jgit.internal.storage.file.FileSnapshot
-
- org.eclipse.jgit.internal.storage.file.PackFileSnapshot
-
class PackFileSnapshot extends FileSnapshot
-
-
Field Summary
Fields Modifier and Type Field Description private AnyObjectId
checksum
private static ObjectId
MISSING_CHECKSUM
private boolean
wasChecksumChanged
-
Fields inherited from class org.eclipse.jgit.internal.storage.file.FileSnapshot
DIRTY, MISSING_FILE, UNKNOWN_SIZE
-
-
Constructor Summary
Constructors Constructor Description PackFileSnapshot(java.io.File packFile)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
isChecksumChanged(java.io.File packFile)
boolean
isModified(java.io.File packFile)
Check if the path may have been modified since the snapshot was saved.private AnyObjectId
readChecksum(java.io.File packFile)
static PackFileSnapshot
save(java.io.File path)
Record a snapshot for a specific packfile path.(package private) void
setChecksum(AnyObjectId checksum)
java.lang.String
toString()
(package private) boolean
wasChecksumChanged()
-
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 Detail
-
MISSING_CHECKSUM
private static final ObjectId MISSING_CHECKSUM
-
checksum
private AnyObjectId checksum
-
wasChecksumChanged
private boolean wasChecksumChanged
-
-
Method Detail
-
save
public static PackFileSnapshot save(java.io.File path)
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
void setChecksum(AnyObjectId checksum)
-
isModified
public boolean isModified(java.io.File packFile)
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
boolean isChecksumChanged(java.io.File packFile)
-
readChecksum
private AnyObjectId readChecksum(java.io.File packFile)
-
wasChecksumChanged
boolean wasChecksumChanged()
-
toString
public java.lang.String toString()
Description copied from class:FileSnapshot
- Overrides:
toString
in classFileSnapshot
-
-