class OutboundMessageFragments
extends java.lang.Object
getNextVolley()
. This also honors per-peer throttling, taking
note of each peer's allocations. If a message has each of its fragments
sent more than a certain number of times, it is failed out. In addition,
this instance also receives notification of message ACKs from the
InboundMessageFragments
, signaling that we can stop sending a
message.修飾子とタイプ | クラス | 説明 |
---|---|---|
static interface |
OutboundMessageFragments.ActiveThrottle |
throttle
|
修飾子とタイプ | フィールド | 説明 |
---|---|---|
(package private) static int |
MAX_VOLLEYS |
if we can handle more messages explicitly, set this to true
|
コンストラクタ | 説明 |
---|---|
OutboundMessageFragments(RouterContext ctx,
UDPTransport transport,
OutboundMessageFragments.ActiveThrottle throttle) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
add(java.util.List<OutboundMessageState> states,
PeerState peer) |
Short circuit the OutNetMessage, letting us send multiple messages
reliably and efficiently.
|
void |
add(OutNetMessage msg) |
Add a new message to the active pool
|
void |
add(OutboundMessageState state,
PeerState peer) |
Short circuit the OutNetMessage, letting us send the establish
complete message reliably.
|
void |
add(PeerState peer) |
Add the peer to the list of peers wanting to transmit something.
|
(package private) void |
dropPeer(PeerState peer) |
|
java.util.List<UDPPacket> |
getNextVolley() |
Fetch all the packets for a message volley, blocking until there is a
message which can be fully transmitted (or the transport is shut down).
|
void |
shutdown() |
|
void |
startup() |
|
boolean |
waitForMoreAllowed() |
Block until we allow more messages to be admitted to the active
pool.
|
static final int MAX_VOLLEYS
public OutboundMessageFragments(RouterContext ctx, UDPTransport transport, OutboundMessageFragments.ActiveThrottle throttle)
public void startup()
public void shutdown()
void dropPeer(PeerState peer)
public boolean waitForMoreAllowed()
OutboundRefiller
public void add(OutNetMessage msg)
public void add(OutboundMessageState state, PeerState peer)
public void add(java.util.List<OutboundMessageState> states, PeerState peer)
public void add(PeerState peer)
public java.util.List<UDPPacket> getNextVolley()