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 AnyObjectIdchecksumprivate static ObjectIdMISSING_CHECKSUMprivate booleanwasChecksumChanged-
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) booleanisChecksumChanged(java.io.File packFile)booleanisModified(java.io.File packFile)Check if the path may have been modified since the snapshot was saved.private AnyObjectIdreadChecksum(java.io.File packFile)static PackFileSnapshotsave(java.io.File path)Record a snapshot for a specific packfile path.(package private) voidsetChecksum(AnyObjectId checksum)java.lang.StringtoString()(package private) booleanwasChecksumChanged()-
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:
isModifiedin 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:
toStringin classFileSnapshot
-
-