Class SinglePeerUploader

java.lang.Object
com.biglybt.core.networkmanager.impl.RateControlledSingleEntity
com.biglybt.core.networkmanager.impl.SinglePeerUploader
All Implemented Interfaces:
ControllerAllocationManagement, RateControlledEntity

public class SinglePeerUploader extends RateControlledSingleEntity
A fast write entity backed by a single peer connection.
  • Field Details

  • Constructor Details

  • Method Details

    • getRateHandler

      public RateHandler getRateHandler()
    • getPartitionID

      public int getPartitionID()
      Description copied from interface: RateControlledEntity
      Is ready for a processing op.
      Returns:
      true if it can process >0 bytes, false if not ready
    • canProcess

      public boolean canProcess(EventWaiter waiter)
      /////////////RateControlledWriteEntity implementation ////////////////////
    • doProcessing

      public long doProcessing(EventWaiter waiter, int max_bytes)
      Description copied from interface: RateControlledEntity
      Attempt to do a processing operation.
      Returns:
      true if >0 bytes were processed (success), false if 0 bytes were processed (failure)
    • getPriority

      public int getPriority()
      Description copied from interface: RateControlledEntity
      Get this entity's priority level.
      Returns:
      priority
    • getPriorityBoost

      public boolean getPriorityBoost()
      Description copied from interface: RateControlledEntity
      stats functions
      Returns:
    • getBytesReadyToWrite

      public long getBytesReadyToWrite()
    • getConnectionCount

      public int getConnectionCount(EventWaiter waiter)
      Description copied from interface: RateControlledEntity
      If there are no connections then the waiter will be kicked when a connection arrives
      Parameters:
      waiter -
      Returns:
    • getReadyConnectionCount

      public int getReadyConnectionCount(EventWaiter waiter)
      Description copied from interface: RateControlledEntity
      The waiter is kicked if the ready condition changes
      Parameters:
      waiter -
      Returns:
    • getString

      public String getString()