net.i2p.router.tunnel
Class TrivialPreprocessor
java.lang.Object
net.i2p.router.tunnel.TrivialPreprocessor
- All Implemented Interfaces:
- TunnelGateway.QueuePreprocessor
- Direct Known Subclasses:
- TrivialRouterPreprocessor
- public class TrivialPreprocessor
- extends java.lang.Object
- implements TunnelGateway.QueuePreprocessor
Do the simplest thing possible for preprocessing - for each message available,
turn it into the minimum number of fragmented preprocessed blocks, sending
each of those out. This does not coallesce message fragments or delay for more
optimal throughput.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PREPROCESSED_SIZE
static final int PREPROCESSED_SIZE
- See Also:
- Constant Field Values
TrivialPreprocessor
public TrivialPreprocessor(I2PAppContext ctx)
preprocessQueue
public boolean preprocessQueue(java.util.List pending,
TunnelGateway.Sender sender,
TunnelGateway.Receiver rec)
- Specified by:
preprocessQueue
in interface TunnelGateway.QueuePreprocessor
- Parameters:
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)
- Returns:
- true if we should delay before preprocessing again
notePreprocessing
protected void notePreprocessing(long messageId,
int numFragments)