- All Implemented Interfaces:
RpcMultiplexer
public class WeightedRoundRobinMultiplexer
extends java.lang.Object
implements RpcMultiplexer
Determines which queue to start reading from, occasionally drawing from
low-priority queues in order to prevent starvation. Given the pull pattern
[9, 4, 1] for 3 queues:
The cycle is (a minimum of) 9+4+1=14 reads.
Queue 0 is read (at least) 9 times
Queue 1 is read (at least) 4 times
Queue 2 is read (at least) 1 time
Repeat
There may be more reads than the minimum due to race conditions. This is
allowed by design for performance reasons.