Class LWSDiskManager.sePiece
java.lang.Object
com.biglybt.core.lws.LWSDiskManager.sePiece
- All Implemented Interfaces:
DiskManagerPiece
- Enclosing class:
LWSDiskManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancalcDone()booleanvoidvoidvoidclearWritten(int b) intgetBlockSize(int b) intintintintshortintboolean[]booleanbooleanisDone()booleanThis must not be used to qualify pieces in End Game Mode.booleanbooleanbooleanbooleanisNeeded()booleanbooleanreturns true if all the files that the piece spans are skippedbooleanbooleanisWritten(int blockNumber) voidreDownloadBlock(int blockNumber) voidreset()voidvoidsetChecking(boolean b) voidsetDone(boolean b) voidvoidvoidvoidvoidsetNeeded(boolean b) voidsetReadCount(short c) voidsetWritten(int b) boolean
-
Constructor Details
-
sePiece
protected sePiece()
-
-
Method Details
-
clearChecking
public void clearChecking() -
isNeedsCheck
public boolean isNeedsCheck()- Specified by:
isNeedsCheckin interfaceDiskManagerPiece
-
spansFiles
public boolean spansFiles()- Specified by:
spansFilesin interfaceDiskManagerPiece
-
getPieceList
- Specified by:
getPieceListin interfaceDiskManagerPiece
-
getLength
public int getLength()- Specified by:
getLengthin interfaceDiskManagerPiece
-
getNbBlocks
public int getNbBlocks()- Specified by:
getNbBlocksin interfaceDiskManagerPiece
-
getPieceNumber
public int getPieceNumber()- Specified by:
getPieceNumberin interfaceDiskManagerPiece
-
getBlockSize
public int getBlockSize(int b) - Specified by:
getBlockSizein interfaceDiskManagerPiece
-
isWritten
public boolean isWritten()- Specified by:
isWrittenin interfaceDiskManagerPiece
-
getNbWritten
public int getNbWritten()- Specified by:
getNbWrittenin interfaceDiskManagerPiece
-
getWritten
public boolean[] getWritten()- Specified by:
getWrittenin interfaceDiskManagerPiece
-
reDownloadBlock
public void reDownloadBlock(int blockNumber) - Specified by:
reDownloadBlockin interfaceDiskManagerPiece
-
reset
public void reset()- Specified by:
resetin interfaceDiskManagerPiece
-
isDownloadable
public boolean isDownloadable()Description copied from interface:DiskManagerPieceThis must not be used to qualify pieces in End Game Mode.- Specified by:
isDownloadablein interfaceDiskManagerPiece- Returns:
- true if a piece is Needed but is not fully; Requested, Downloaded, Written, Checking, or Done.
-
setDownloadable
public void setDownloadable()- Specified by:
setDownloadablein interfaceDiskManagerPiece
-
getManager
- Specified by:
getManagerin interfaceDiskManagerPiece
-
calcNeeded
public boolean calcNeeded()- Specified by:
calcNeededin interfaceDiskManagerPiece
-
clearNeeded
public void clearNeeded()- Specified by:
clearNeededin interfaceDiskManagerPiece
-
isNeeded
public boolean isNeeded()- Specified by:
isNeededin interfaceDiskManagerPiece- Returns:
- 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
-
setNeeded
public void setNeeded()- Specified by:
setNeededin interfaceDiskManagerPiece
-
setNeeded
public void setNeeded(boolean b) - Specified by:
setNeededin interfaceDiskManagerPiece
-
setWritten
public void setWritten(int b) - Specified by:
setWrittenin interfaceDiskManagerPiece
-
clearWritten
public void clearWritten(int b) - Specified by:
clearWrittenin interfaceDiskManagerPiece
-
isWritten
public boolean isWritten(int blockNumber) - Specified by:
isWrittenin interfaceDiskManagerPiece- Parameters:
blockNumber- int- Returns:
- true if the given blockNumber has already been written to disk
-
calcChecking
public boolean calcChecking() -
isChecking
public boolean isChecking()- Specified by:
isCheckingin interfaceDiskManagerPiece
-
setChecking
public void setChecking()- Specified by:
setCheckingin interfaceDiskManagerPiece
-
setChecking
public void setChecking(boolean b) -
calcDone
public boolean calcDone()- Specified by:
calcDonein interfaceDiskManagerPiece
-
isDone
public boolean isDone()- Specified by:
isDonein interfaceDiskManagerPiece- Returns:
- true when the hash check has passed and the DiskManager has asynchronously updated the Done status. There is nothing further to be done regarding downloading for pieces that are Done.
-
isInteresting
public boolean isInteresting()- Specified by:
isInterestingin interfaceDiskManagerPiece- Returns:
- true if a piece is Needed and not Done
-
isSkipped
public boolean isSkipped()Description copied from interface:DiskManagerPiecereturns true if all the files that the piece spans are skipped- Specified by:
isSkippedin interfaceDiskManagerPiece- Returns:
-
getString
- Specified by:
getStringin interfaceDiskManagerPiece
-
getReadCount
public short getReadCount()- Specified by:
getReadCountin interfaceDiskManagerPiece
-
setReadCount
public void setReadCount(short c) - Specified by:
setReadCountin interfaceDiskManagerPiece
-
isMergeRead
public boolean isMergeRead()- Specified by:
isMergeReadin interfaceDiskManagerPiece
-
isMergeWrite
public boolean isMergeWrite()- Specified by:
isMergeWritein interfaceDiskManagerPiece
-
setMergeRead
public void setMergeRead()- Specified by:
setMergeReadin interfaceDiskManagerPiece
-
setMergeWrite
public void setMergeWrite()- Specified by:
setMergeWritein interfaceDiskManagerPiece
-
getRemaining
public int getRemaining()- Specified by:
getRemainingin interfaceDiskManagerPiece
-
setDone
public void setDone(boolean b) - Specified by:
setDonein interfaceDiskManagerPiece
-