| Constructor and Description |
|---|
DiskJobWriteBlock(Piece piece,
int blockIndex,
byte[] data,
Consumer<DiskJobWriteBlock> callback)
Creates a new job to store a block of a piece.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBlockIndex()
Gets the block index within the owning piece.
|
Piece |
getPiece()
Gets the piece for which this store task is being used.
|
int |
getPriority()
The priority of this job
|
void |
process()
Processes the disk job
|
public DiskJobWriteBlock(Piece piece, int blockIndex, byte[] data, Consumer<DiskJobWriteBlock> callback)
piece - The piece in which this block is foundblockIndex - The index of the block within the given piece.data - The bytes to write for the blockcallback - The callback which gets called on completion of this jobpublic void process()
throws IOException
IDiskJobprocess in interface IDiskJobIOExceptionpublic Piece getPiece()
public int getBlockIndex()
getPiece()public int getPriority()
getPriority in interface IDiskJobCopyright © 2016. All rights reserved.