bamboo.lss
Class UdpCC.Connection

java.lang.Object
  extended by bamboo.lss.UdpCC.Connection
Enclosing class:
UdpCC

protected class UdpCC.Connection
extends Object

Keep track of all of the relavent information about another node we are talking to.


Field Summary
 LinkedList ack_q
          The sequence numbers of acknowledgements we need to send out.
 InetSocketAddress addr
           
 int consecutive_timeouts
           
 double cwnd
          The congestion window size and slow-start threshold.
 boolean in_rr
          Are we currently in the round-robin queue?
 Map inf
          TimeoutInfo objects for each message in flight, indexed by sequence number.
 long lastrcv
          The time in milliseconds since the epoch since we last sent a message to this host and since we last received an acknowledgement from them.
 long lastsnd
          The time in milliseconds since the epoch since we last sent a message to this host and since we last received an acknowledgement from them.
 UdpCC.Connection next
          Which connection is after us in the round-robin queue?
 int next_q
          We put messages on the wire from the send_q, ack_q, probe_q, and retry_q in round-robin fashion, and this integer keeps track of which one to pull out of next time we can write the socket.
 LinkedList probe_q
          Non-conjestion controlled messages that need to be sent.
 LinkedList retry_q
          TimeoutInfo objects for messages that need to be resent.
 long rto
          The mean RTT, variance of the RTT, and the round-trip timeout to this host, all in milliseconds.
 long sa
          The mean RTT, variance of the RTT, and the round-trip timeout to this host, all in milliseconds.
 LinkedList send_q
          TimeoutInfo objects for new messages to be sent out.
 double ssthresh
          The congestion window size and slow-start threshold.
 long sv
          The mean RTT, variance of the RTT, and the round-trip timeout to this host, all in milliseconds.
 long time_to_ack
          We use these to keep track of the time that the average message takes to be acknowledged.
 int time_to_ack_cnt
           
 long time_to_first_send
          We use these to keep track of the time that the average message spends in the send_q before being sent out on the wire.
 int time_to_first_send_cnt
           
 
Constructor Summary
UdpCC.Connection(InetSocketAddress a, long now_ms)
           
 
Method Summary
 void add_rtt_meas(long m)
           
 boolean can_send_ack()
          Do we have an ack to send?
 boolean can_send_either()
          Do we have a regular msg to send or retry, and are we within the congestion window?
 boolean can_send_msg()
          Do we have a regular msg to send, and are we within the congestion window?
 boolean can_send_probe()
          Do we have a nocc msg to send?
 boolean can_send_retry()
          Do we have a regular msg to retry, and are we within the congestion window?
 void timeout()
           
 boolean writable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addr

public InetSocketAddress addr

sa

public long sa
The mean RTT, variance of the RTT, and the round-trip timeout to this host, all in milliseconds. The mean is scaled by a factor of 8, and the variance is scaled by a factor of 4. See [Jac88].


sv

public long sv
The mean RTT, variance of the RTT, and the round-trip timeout to this host, all in milliseconds. The mean is scaled by a factor of 8, and the variance is scaled by a factor of 4. See [Jac88].


rto

public long rto
The mean RTT, variance of the RTT, and the round-trip timeout to this host, all in milliseconds. The mean is scaled by a factor of 8, and the variance is scaled by a factor of 4. See [Jac88].


consecutive_timeouts

public int consecutive_timeouts

cwnd

public double cwnd
The congestion window size and slow-start threshold. See [Jac88].


ssthresh

public double ssthresh
The congestion window size and slow-start threshold. See [Jac88].


inf

public Map inf
TimeoutInfo objects for each message in flight, indexed by sequence number.


ack_q

public LinkedList ack_q
The sequence numbers of acknowledgements we need to send out.


send_q

public LinkedList send_q
TimeoutInfo objects for new messages to be sent out.


probe_q

public LinkedList probe_q
Non-conjestion controlled messages that need to be sent.


retry_q

public LinkedList retry_q
TimeoutInfo objects for messages that need to be resent.


lastsnd

public long lastsnd
The time in milliseconds since the epoch since we last sent a message to this host and since we last received an acknowledgement from them.


lastrcv

public long lastrcv
The time in milliseconds since the epoch since we last sent a message to this host and since we last received an acknowledgement from them.


time_to_first_send

public long time_to_first_send
We use these to keep track of the time that the average message spends in the send_q before being sent out on the wire.


time_to_first_send_cnt

public int time_to_first_send_cnt

time_to_ack

public long time_to_ack
We use these to keep track of the time that the average message takes to be acknowledged.


time_to_ack_cnt

public int time_to_ack_cnt

next_q

public int next_q
We put messages on the wire from the send_q, ack_q, probe_q, and retry_q in round-robin fashion, and this integer keeps track of which one to pull out of next time we can write the socket.


next

public UdpCC.Connection next
Which connection is after us in the round-robin queue?


in_rr

public boolean in_rr
Are we currently in the round-robin queue?

Constructor Detail

UdpCC.Connection

public UdpCC.Connection(InetSocketAddress a,
                        long now_ms)
Method Detail

can_send_msg

public final boolean can_send_msg()
Do we have a regular msg to send, and are we within the congestion window?


can_send_retry

public final boolean can_send_retry()
Do we have a regular msg to retry, and are we within the congestion window?


can_send_either

public final boolean can_send_either()
Do we have a regular msg to send or retry, and are we within the congestion window?


can_send_probe

public final boolean can_send_probe()
Do we have a nocc msg to send?


can_send_ack

public final boolean can_send_ack()
Do we have an ack to send?


writable

public final boolean writable()

add_rtt_meas

public final void add_rtt_meas(long m)

timeout

public final void timeout()