FileDocCategorySizeDatePackage
DiskManagerPiece.javaAPI DocAzureus 3.0.3.43626Wed Mar 21 22:20:46 GMT 2007org.gudy.azureus2.core3.disk

DiskManagerPiece

public interface DiskManagerPiece
Represents a DiskManager Piece
author
parg
author
MjrTom 2005/Oct/08: priority handling 2006/Jan/2: refactoring, mostly to base Piece interface

Fields Summary
Constructors Summary
Methods Summary
public booleancalcDone()

public booleancalcNeeded()

public voidclearNeeded()

public intgetBlockSize(int block_index)

public intgetLength()

public DiskManagergetManager()

public intgetNbBlocks()

public intgetNbWritten()

public intgetPieceNumber()

public shortgetReadCount()

public java.lang.StringgetString()

public boolean[]getWritten()

public booleanisChecking()

public booleanisDone()

return
true when the hash check has passed and the DiskManager has asyncronously updated the Done status. There is nothing further to be done regarding downloading for pieces that are Done.

public booleanisDownloadable()
This must not be used to qualify pieces in End Game Mode.

return
true if a piece is Needed but is not fully; Requested, Downloaded, Written, Checking, or Done.

public booleanisInteresting()

return
true if a piece is Needed and not Done

public booleanisNeeded()

return
true if any file the piece covers is neither Do Not Download nor Delete. This is not a real-time indicator. Also, the results are not reliable for pieces that are Done. Use calcNeeded() for guaranteed correct and up to date results
see
calcNeeded(), clearNeeded(), setNeeded(), setNeeded(boolean)

public booleanisNeedsCheck()

public booleanisSkipped()
returns true if all the files that the piece spans are skipped

return

public booleanisWritten()

public booleanisWritten(int blockNumber)

param
blockNumber int
return
true if the given blockNumber has already been written to disk

public voidreDownloadBlock(int blockNumber)

public voidreset()

public voidsetChecking()

public voidsetDone(boolean b)

public voidsetDownloadable()

public voidsetNeeded()

public voidsetNeeded(boolean b)

public voidsetReadCount(short c)

public voidsetWritten(int blockNumber)