Package io.camunda.zeebe.snapshots
Interface MutableChecksumsSFV
- All Superinterfaces:
ImmutableChecksumsSFV
- All Known Implementing Classes:
SfvChecksumImpl
Mutable checksum collection in simple file verification (SFV) file format
-
Method Summary
Modifier and TypeMethodDescriptionvoidupdateFromBytes(String fileName, byte[] bytes) Update the checksum collection, and add a new checksum from given bytes, likely a read file or soon to be written file.voidupdateFromChecksum(Path filePath, long checksum) Update the checksum map with the given checksumvoidupdateFromFile(Path filePath) Update the checksum collection, and add a new checksum from a given file path.voidupdateFromSfvFile(String... lines) Build the checksum collection from a SFV format string array.Methods inherited from interface io.camunda.zeebe.snapshots.ImmutableChecksumsSFV
getChecksums, getCombinedChecksum, sameChecksums, write
-
Method Details
-
updateFromFile
Update the checksum collection, and add a new checksum from a given file path.- Parameters:
filePath- the path to a file for which a checksum is created and added to the collection- Throws:
IOException- when reading of given file fails
-
updateFromBytes
Update the checksum collection, and add a new checksum from given bytes, likely a read file or soon to be written file.Useful, if we want to avoid re-reading files etc.
- Parameters:
fileName- the name of the file (which relates to the given bytes), that is used in the checksum collection in SFV file formatbytes- the bytes for which the checksum should be created
-
updateFromSfvFile
Build the checksum collection from a SFV format string array.- Parameters:
lines- the lines (in SFV) to build up the checksum collection
-
updateFromChecksum
Update the checksum map with the given checksum- Parameters:
filePath- path to filechecksum- check of file given
-