public class RemoveQueueBundler extends BaseBundler
TransferQueueBundler
, this bundler uses a RingBuffer
rather than an ArrayBlockingQueue
and the size of the remove queue is fixed. TransferQueueBundler increases the size of the remove queue
dynamically, which leads to higher latency if the remove queue grows too much.
Modifier and Type | Field and Description |
---|---|
protected AverageMinMax |
avg_batch_size |
protected int |
queue_size |
protected RingBuffer<Message> |
rb |
protected Message[] |
remove_queue |
protected Runner |
runner |
Constructor and Description |
---|
RemoveQueueBundler() |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getStats()
Returns stats about the bundler itself.
|
void |
init(TP transport)
Called after creation of the bundler
|
void |
resetStats() |
String |
rqbAvgBatchSize() |
int |
rqbRemoveQueueSize() |
void |
rqbRemoveQueueSize(int size) |
int |
rqbRingBufferSize() |
void |
run() |
void |
send(Message msg) |
protected void |
sendMessageList(Address dest,
Address src,
List<Message> list) |
int |
size()
The number of unsent messages in the bundler
|
void |
start()
Called after
Bundler.init(TP) |
void |
stop() |
addMessage, clearMessages, sendBundledMessages, sendSingleMessage, viewChange
protected RingBuffer<Message> rb
protected Runner runner
protected Message[] remove_queue
protected final AverageMinMax avg_batch_size
protected int queue_size
public int rqbRemoveQueueSize()
public void rqbRemoveQueueSize(int size)
public String rqbAvgBatchSize()
public int rqbRingBufferSize()
public Map<String,Object> getStats()
Bundler
public void resetStats()
public void init(TP transport)
Bundler
init
in interface Bundler
init
in class BaseBundler
transport
- the transport, for further referencepublic void start()
Bundler
Bundler.init(TP)
start
in interface Bundler
start
in class BaseBundler
public void stop()
stop
in interface Bundler
stop
in class BaseBundler
public void send(Message msg) throws Exception
send
in interface Bundler
send
in class BaseBundler
Exception
public void run()
public int size()
Bundler
size
in interface Bundler
size
in class BaseBundler
protected void sendMessageList(Address dest, Address src, List<Message> list)
sendMessageList
in class BaseBundler
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.