TunnelGateway.QueuePreprocessor
BatchedRouterPreprocessor
class BatchedPreprocessor extends TrivialPreprocessor
修飾子とタイプ | フィールド | 説明 |
---|---|---|
(package private) static long |
DEFAULT_DELAY |
_context, _dataCache, _log, IV_SIZE, PREPROCESSED_SIZE
コンストラクタ | 説明 |
---|---|
BatchedPreprocessor(RouterContext ctx,
java.lang.String name) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
long |
getDelayAmount() |
how long do we want to wait before flushing
|
protected long |
getSendDelay() |
Wait up to this long before sending (flushing) a small tunnel message
Warning - overridden in BatchedRouterPreprocessor
|
boolean |
preprocessQueue(java.util.List<PendingGatewayMessage> pending,
TunnelGateway.Sender sender,
TunnelGateway.Receiver rec) |
Return true if there were messages remaining, and we should queue up
a delayed flush to clear them
NOTE: Unused here, see BatchedPreprocessor override, super is not called.
|
protected void |
send(java.util.List<PendingGatewayMessage> pending,
int startAt,
int sendThrough,
TunnelGateway.Sender sender,
TunnelGateway.Receiver rec) |
Preprocess the messages from the pending list, grouping items startAt
through sendThrough (though only part of the last one may be fully
sent), delivering them through the sender/receiver.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInstructionAugmentationSize, getInstructionsSize, notePreprocessing, preprocess, writeFirstFragment, writeSubsequentFragment
public BatchedPreprocessor(RouterContext ctx, java.lang.String name)
protected long getSendDelay()
public long getDelayAmount()
getDelayAmount
インタフェース内 TunnelGateway.QueuePreprocessor
getDelayAmount
クラス内 TrivialPreprocessor
public boolean preprocessQueue(java.util.List<PendingGatewayMessage> pending, TunnelGateway.Sender sender, TunnelGateway.Receiver rec)
TrivialPreprocessor
preprocessQueue
インタフェース内 TunnelGateway.QueuePreprocessor
preprocessQueue
クラス内 TrivialPreprocessor
pending
- list of Pending objects for messages either unsent
or partly sent. This list should be update with any
values removed (the preprocessor owns the lock)
Messages are not removed from the list until actually sent.
The status of unsent and partially-sent messages is stored in
the Pending structure.protected void send(java.util.List<PendingGatewayMessage> pending, int startAt, int sendThrough, TunnelGateway.Sender sender, TunnelGateway.Receiver rec)
startAt
- first index in pending to send (inclusive)sendThrough
- last index in pending to send (inclusive)