public interface Nonce
A nonce. Each nonce contains scoops.
Each scoop contains a pair of hashes.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddumpInto(FileChannel where, int metadataSize, long offset, long length) Dumps this nonce into the give file, as theoffsetth nonce inside the file.getDeadline(DeadlineDescription description) Yields the deadline of this nonce, with the given description.
-
Method Details
-
dumpInto
Dumps this nonce into the give file, as theoffsetth nonce inside the file.- Parameters:
where- the file channel where the nonce must be dumpedmetadataSize- the size of the metadata of the plot file, that precedes the noncesoffset- the progressive number of the nonce inside the file; for instance, if the file will contains nonces from progressive 100 to progressive 150, then they are placed at offsets from 0 to 50 inside the file, respectivelylength- the total number of nonces that will be contained in the file- Throws:
IOException- if the nonce could not be dumped into the file
-
getDeadline
Yields the deadline of this nonce, with the given description.- Parameters:
description- the description of requested deadline- Returns:
- the deadline
- Throws:
IllegalArgumentException- if the hashing algorithm indescriptiondoes not match that used in plot file for this nonce
-