|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aelitis.azureus.core.networkmanager.impl.MultiPeerUploader
public class MultiPeerUploader
A rate-controlled write entity backed by multiple peer connections, with an emphasis on transmitting packets with full payloads, i.e. it writes to the transport in mss-sized chunks if at all possible. It also employs fair, round-robin write scheduling, where connections each take turns writing a single full packet per round.
Field Summary |
---|
Fields inherited from interface com.aelitis.azureus.core.networkmanager.impl.RateControlledEntity |
---|
PRIORITY_HIGH, PRIORITY_NORMAL |
Constructor Summary | |
---|---|
MultiPeerUploader(RateHandler rate_handler)
Create a new packet-filling multi-peer upload entity, rate-controlled by the given handler. |
Method Summary | |
---|---|
void |
addPeerConnection(NetworkConnectionBase peer_connection)
Add the given connection to be managed by this upload entity. |
boolean |
canProcess(EventWaiter waiter)
Is ready for a processing op. |
void |
destroy()
Destroy this upload entity. |
int |
doProcessing(EventWaiter waiter,
int max_bytes)
Attempt to do a processing operation. |
long |
getBytesReadyToWrite()
|
int |
getConnectionCount(EventWaiter _waiter)
If there are no connections then the waiter will be kicked when a connection arrives |
int |
getPriority()
Get this entity's priority level. |
boolean |
getPriorityBoost()
stats functions |
RateHandler |
getRateHandler()
|
int |
getReadyConnectionCount(EventWaiter waiter)
The waiter is kicked if the ready condition changes |
java.lang.String |
getString()
|
boolean |
removePeerConnection(NetworkConnectionBase peer_connection)
Remove the given connection from this upload entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiPeerUploader(RateHandler rate_handler)
rate_handler
- listener to handle upload rate limitsMethod Detail |
---|
public RateHandler getRateHandler()
getRateHandler
in interface RateControlledEntity
public void destroy()
public void addPeerConnection(NetworkConnectionBase peer_connection)
peer_connection
- to be write managedpublic boolean removePeerConnection(NetworkConnectionBase peer_connection)
peer_connection
- to be removed
public long getBytesReadyToWrite()
getBytesReadyToWrite
in interface RateControlledEntity
public int getConnectionCount(EventWaiter _waiter)
RateControlledEntity
getConnectionCount
in interface RateControlledEntity
public int getReadyConnectionCount(EventWaiter waiter)
RateControlledEntity
getReadyConnectionCount
in interface RateControlledEntity
public boolean canProcess(EventWaiter waiter)
RateControlledEntity
canProcess
in interface RateControlledEntity
public int doProcessing(EventWaiter waiter, int max_bytes)
RateControlledEntity
doProcessing
in interface RateControlledEntity
public int getPriority()
RateControlledEntity
getPriority
in interface RateControlledEntity
public boolean getPriorityBoost()
RateControlledEntity
getPriorityBoost
in interface RateControlledEntity
public java.lang.String getString()
getString
in interface RateControlledEntity
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |