public class FilePiecePriorityMapper extends Object
Modifier and Type | Method and Description |
---|---|
static FilePiecePriorityMapper |
createPiecePriorityMapper(DataDescriptor dataDescriptor,
List<TorrentFile> files,
FilePrioritySelector selector)
Create a new File Pieces priority mapper from a priority updater.
|
static FilePiecePriorityMapper |
createPiecePriorityMapper(DataDescriptor dataDescriptor,
List<TorrentFile> files,
FilePrioritySkipSelector selector)
Create a new File Pieces priority mapper from a choosing file selector
|
List<TorrentFile> |
getAllFilesToDownload()
Return the list of all files that are downloaded (not skipped)
|
BitSet |
getHighPriorityPieces()
Get the BitSet of pieces that were marked as high priority from this priority mapper
|
BitSet |
getSkippedPieces()
Get the BitSet of pieces that were marked as skipped from this priority mapper
|
public static FilePiecePriorityMapper createPiecePriorityMapper(DataDescriptor dataDescriptor, List<TorrentFile> files, FilePrioritySelector selector)
dataDescriptor
- the data descriptor of the torrentfiles
- the files that are being downloadedselector
- the selector with the updated priority informationpublic static FilePiecePriorityMapper createPiecePriorityMapper(DataDescriptor dataDescriptor, List<TorrentFile> files, FilePrioritySkipSelector selector)
dataDescriptor
- the data descriptor of the torrent.files
- the files that are being downloaded.selector
- the selector with the updated information. nullablepublic BitSet getSkippedPieces()
public BitSet getHighPriorityPieces()
public List<TorrentFile> getAllFilesToDownload()
Copyright © 2016–2021. All rights reserved.