Package org.johnnei.javatorrent.disk
Class DiskJobCheckHash
- java.lang.Object
-
- org.johnnei.javatorrent.disk.DiskJobCheckHash
-
-
Constructor Summary
Constructors Constructor Description DiskJobCheckHash(Piece piece, Consumer<DiskJobCheckHash> callback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PiecegetPiece()Gets the piece for which the hash has been verified.intgetPriority()The priority of this jobbooleanisMatchingHash()This method returns the result of theprocess()call.voidprocess()Processes the disk jobStringtoString()
-
-
-
Constructor Detail
-
DiskJobCheckHash
public DiskJobCheckHash(Piece piece, Consumer<DiskJobCheckHash> callback)
-
-
Method Detail
-
process
public void process() throws IOExceptionDescription copied from interface:IDiskJobProcesses the disk job- Specified by:
processin interfaceIDiskJob- Throws:
IOException
-
getPriority
public int getPriority()
Description copied from interface:IDiskJobThe priority of this job- Specified by:
getPriorityin interfaceIDiskJob- Returns:
- The priority
-
isMatchingHash
public boolean isMatchingHash()
This method returns the result of theprocess()call.- Returns:
truewhen the hash verification passed, otherwisefalse.- See Also:
process()
-
getPiece
public Piece getPiece()
Gets the piece for which the hash has been verified.- Returns:
- The piece which is affected by this job.
-
-