Class ExternalSeedReaderGetRight
java.lang.Object
com.biglybt.plugin.extseed.impl.ExternalSeedReaderImpl
com.biglybt.plugin.extseed.impl.getright.ExternalSeedReaderGetRight
- All Implemented Interfaces:
PiecePriorityProvider, PeerManagerListener2, ExternalSeedReader
public class ExternalSeedReaderGetRight
extends ExternalSeedReaderImpl
implements PiecePriorityProvider
-
Nested Class Summary
Nested classes/interfaces inherited from class ExternalSeedReaderImpl
ExternalSeedReaderImpl.MutableInteger -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long[]private long[]private ExternalSeedHTTPDownloader[]private booleanprivate intprivate long[]private intprivate intprivate static final intprivate URLFields inherited from class ExternalSeedReaderImpl
INITIAL_DELAY, RECONNECT_DEFAULT, STALLED_DOWNLOAD_SPEED, STALLED_PEER_SPEED, TOP_PIECE_PRIORITY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExternalSeedReaderGetRight(ExternalSeedPlugin _plugin, Torrent _torrent, URL _url, Map _params) -
Method Summary
Modifier and TypeMethodDescriptionvoidcalculatePriorityOffsets(PeerManager peer_manager, int[] base_priorities) getName()protected intintgetPort()protected booleangetType()getURL()protected voidreadData(int start_piece_number, int start_piece_offset, int length, ExternalSeedHTTPDownloaderListener listener) protected voidreadData(ExternalSeedReaderRequest request) booleansameAs(ExternalSeedReader other) protected voidsetActiveSupport(PeerManager peer_manager, boolean active) private voidlong[]updatePriorities(PiecePicker picker) Methods inherited from class ExternalSeedReaderImpl
addListener, addRequests, cancelAllRequests, cancelRequest, checkActivation, deactivate, eventOccurred, getBooleanParam, getCurrentIncomingRequestProgress, getExpiredRequests, getFailureCount, getIntParam, getIP, getLastFailTime, getMaximumNumberOfRequests, getOutgoingRequestCount, getOutgoingRequestedPieceNumbers, getPermittedBytes, getPriorityOffsets, getRequestCount, getRequests, getStatus, getSystemTime, getTorrent, getUserAgent, informCancelled, informComplete, informFailed, isActive, isPermanentlyUnavailable, isTransient, log, processRequests, processRequests, read, readBytes, readyToActivate, readyToDeactivate, removeListener, reportBytesRead, selectRequests, setActive, setReconnectDelay
-
Field Details
-
TARGET_REQUEST_SIZE_DEFAULT
private static final int TARGET_REQUEST_SIZE_DEFAULT- See Also:
-
url
-
port
private int port -
http_downloaders
-
downloader_offsets
private long[] downloader_offsets -
downloader_lengths
private long[] downloader_lengths -
piece_size
private int piece_size -
piece_group_size
private int piece_group_size -
piece_priorities
private long[] piece_priorities -
linear_download
private boolean linear_download
-
-
Constructor Details
-
ExternalSeedReaderGetRight
-
-
Method Details
-
setupDownloaders
private void setupDownloaders() -
sameAs
- Specified by:
sameAsin interfaceExternalSeedReader
-
getName
- Specified by:
getNamein interfaceExternalSeedReader
-
getType
- Specified by:
getTypein interfaceExternalSeedReader
-
getURL
- Specified by:
getURLin interfaceExternalSeedReader
-
getPort
public int getPort()- Specified by:
getPortin interfaceExternalSeedReader
-
getPieceGroupSize
protected int getPieceGroupSize()- Specified by:
getPieceGroupSizein classExternalSeedReaderImpl
-
getRequestCanSpanPieces
protected boolean getRequestCanSpanPieces()- Specified by:
getRequestCanSpanPiecesin classExternalSeedReaderImpl
-
setActiveSupport
- Overrides:
setActiveSupportin classExternalSeedReaderImpl
-
updatePriorities
- Specified by:
updatePrioritiesin interfacePiecePriorityProvider
-
calculatePriorityOffsets
- Specified by:
calculatePriorityOffsetsin interfaceExternalSeedReader- Overrides:
calculatePriorityOffsetsin classExternalSeedReaderImpl
-
readData
- Overrides:
readDatain classExternalSeedReaderImpl- Throws:
ExternalSeedException
-
readData
protected void readData(int start_piece_number, int start_piece_offset, int length, ExternalSeedHTTPDownloaderListener listener) throws ExternalSeedException - Specified by:
readDatain classExternalSeedReaderImpl- Throws:
ExternalSeedException
-