Class PackFileSnapshot

java.lang.Object
org.eclipse.jgit.internal.storage.file.FileSnapshot
org.eclipse.jgit.internal.storage.file.PackFileSnapshot

class PackFileSnapshot extends FileSnapshot
  • Field Details

    • MISSING_CHECKSUM

      private static final ObjectId MISSING_CHECKSUM
    • checksum

      private AnyObjectId checksum
    • wasChecksumChanged

      private boolean wasChecksumChanged
  • Constructor Details

    • PackFileSnapshot

      PackFileSnapshot(File packFile)
  • Method Details

    • save

      public static PackFileSnapshot save(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(File packFile)
      Check if the path may have been modified since the snapshot was saved.
      Overrides:
      isModified in class FileSnapshot
      Parameters:
      packFile - the path the snapshot describes.
      Returns:
      true if the path needs to be read again.
    • isChecksumChanged

      boolean isChecksumChanged(File packFile)
    • readChecksum

      private AnyObjectId readChecksum(File packFile)
    • wasChecksumChanged

      boolean wasChecksumChanged()
    • toString

      public String toString()
      Description copied from class: FileSnapshot
      Overrides:
      toString in class FileSnapshot