Package net.i2p.router.tunnel
Class BatchedRouterPreprocessor
java.lang.Object
net.i2p.router.tunnel.TrivialPreprocessor
net.i2p.router.tunnel.BatchedPreprocessor
net.i2p.router.tunnel.BatchedRouterPreprocessor
- All Implemented Interfaces:
TunnelGateway.QueuePreprocessor
class BatchedRouterPreprocessor extends BatchedPreprocessor
Honor the 'batchFrequency' tunnel pool setting or the 'router.batchFrequency'
router config setting, and track fragmentation.
-
Field Summary
Fields Modifier and Type Field Description protected HopConfig_hopConfigstatic intDEFAULT_BATCH_FREQUENCYfor IBGWs for efficiency (not our data)static intOB_CLIENT_BATCH_FREQfor client OBGWs only (our data)static intOB_EXPL_BATCH_FREQfor exploratory OBGWs only (our tunnel tests and build messages)static StringPROP_BATCH_FREQUENCYHow frequently should we flush non-full messages, in milliseconds This goes in I2CP custom options for the pool.static StringPROP_ROUTER_BATCH_FREQUENCYThis goes in router advanced configFields inherited from class net.i2p.router.tunnel.TrivialPreprocessor
_context, _dataCache, _log, IV_SIZE, PREPROCESSED_SIZE -
Constructor Summary
Constructors Constructor Description BatchedRouterPreprocessor(RouterContext ctx, HopConfig cfg)for IBGWsBatchedRouterPreprocessor(RouterContext ctx, TunnelCreatorConfig cfg)for OBGWs -
Method Summary
Modifier and Type Method Description protected longgetSendDelay()how long should we wait before flushingprotected voidnotePreprocessing(long messageId, int numFragments, int totalLength, List<Long> messageIds, String msg)Methods inherited from class net.i2p.router.tunnel.BatchedPreprocessor
getDelayAmount, preprocessQueue, sendMethods inherited from class net.i2p.router.tunnel.TrivialPreprocessor
getInstructionAugmentationSize, getInstructionsSize, preprocess, writeFirstFragment, writeSubsequentFragment
-
Field Details
-
_hopConfig
-
PROP_BATCH_FREQUENCY
How frequently should we flush non-full messages, in milliseconds This goes in I2CP custom options for the pool. Only applies to OBGWs.- See Also:
- Constant Field Values
-
PROP_ROUTER_BATCH_FREQUENCY
This goes in router advanced config- See Also:
- Constant Field Values
-
OB_CLIENT_BATCH_FREQ
public static final int OB_CLIENT_BATCH_FREQfor client OBGWs only (our data)- See Also:
- Constant Field Values
-
OB_EXPL_BATCH_FREQ
public static final int OB_EXPL_BATCH_FREQfor exploratory OBGWs only (our tunnel tests and build messages)- See Also:
- Constant Field Values
-
DEFAULT_BATCH_FREQUENCY
public static final int DEFAULT_BATCH_FREQUENCYfor IBGWs for efficiency (not our data)- See Also:
- Constant Field Values
-
-
Constructor Details
-
BatchedRouterPreprocessor
for OBGWs -
BatchedRouterPreprocessor
for IBGWs
-
-
Method Details
-
getSendDelay
protected long getSendDelay()how long should we wait before flushing- Overrides:
getSendDelayin classBatchedPreprocessor
-
notePreprocessing
protected void notePreprocessing(long messageId, int numFragments, int totalLength, List<Long> messageIds, String msg)- Overrides:
notePreprocessingin classTrivialPreprocessor
-