java.lang.Object
net.i2p.router.transport.TransportBid

public class TransportBidextends Object
Represents a transport's bid for message delivery cost. Provide a bid for how much it would "cost" to transfer a message of a particular peer.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Sentinel cost a transport bids when it cannot deliver the message right now.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a bid with no latency cost yet, marked by a negative bid value.
  • Method Summary

    All Methods
    Modifier and Type
    Method
    Description
    int
    How long this transport thinks it would take to send the message This is the actual bid value, lower is better, and it doesn't really have anything to do with latency.
    Specifies the transport that offered this bid.
    void
    setLatencyMs(int milliseconds)
    The latency bid value in milliseconds.
    void
    The transport that offered this bid.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TRANSIENT_FAIL

      public static final int TRANSIENT_FAIL
      Sentinel cost a transport bids when it cannot deliver the message right now.
      See Also:
  • Constructor Details

    • TransportBid

      public TransportBid()
      Creates a bid with no latency cost yet, marked by a negative bid value.
  • Method Details

    • getLatencyMs

      public int getLatencyMs()
      How long this transport thinks it would take to send the message This is the actual bid value, lower is better, and it doesn't really have anything to do with latency.
      Returns:
      the latency ms
    • setLatencyMs

      public void setLatencyMs(int milliseconds)
      The latency bid value in milliseconds.
      Parameters:
      milliseconds - the delivery cost this transport is bidding, in milliseconds; lower is better, and negative means no bid was made
    • getTransport

      public Transport getTransport()
      Specifies the transport that offered this bid.
      Returns:
      the transport making the bid, or null if not yet recorded
    • setTransport

      public void setTransport(Transport transport)
      The transport that offered this bid.
      Parameters:
      transport - the transport making the bid, recorded so the cost can be attributed when the message is assigned