public class TransferQueueBundler extends BaseBundler implements Runnable
Modifier and Type | Field and Description |
---|---|
protected Thread |
bundler_thread |
protected AverageMinMax |
fill_count |
protected int |
num_sends_because_full_queue |
protected int |
num_sends_because_no_msgs |
protected BlockingQueue<Message> |
queue |
protected List<Message> |
remove_queue |
protected boolean |
running |
protected static String |
THREAD_NAME |
Modifier | Constructor and Description |
---|---|
|
TransferQueueBundler() |
protected |
TransferQueueBundler(BlockingQueue<Message> queue) |
|
TransferQueueBundler(int capacity) |
Modifier and Type | Method and Description |
---|---|
protected void |
_addMessage(Message msg,
long size) |
protected void |
_sendBundledMessages() |
protected static int |
assertPositive(int value,
String message) |
int |
getBufferSize() |
Map<String,Object> |
getStats()
Returns stats about the bundler itself.
|
Thread |
getThread() |
void |
init(TP tp)
Called after creation of the bundler
|
int |
removeQueueSize() |
TransferQueueBundler |
removeQueueSize(int size) |
void |
resetStats() |
void |
run() |
void |
send(Message msg) |
int |
size()
The number of unsent messages in the bundler
|
void |
start()
Called after
Bundler.init(TP) |
void |
stop() |
addMessage, clearMessages, sendBundledMessages, sendMessageList, sendSingleMessage, viewChange
protected BlockingQueue<Message> queue
protected volatile Thread bundler_thread
protected volatile boolean running
protected int num_sends_because_full_queue
protected int num_sends_because_no_msgs
protected final AverageMinMax fill_count
protected static final String THREAD_NAME
public TransferQueueBundler()
protected TransferQueueBundler(BlockingQueue<Message> queue)
public TransferQueueBundler(int capacity)
public Thread getThread()
public int getBufferSize()
public int removeQueueSize()
public TransferQueueBundler removeQueueSize(int size)
public Map<String,Object> getStats()
Bundler
public void resetStats()
resetStats
in interface Bundler
public void init(TP tp)
Bundler
init
in interface Bundler
init
in class BaseBundler
tp
- 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 int size()
Bundler
size
in interface Bundler
size
in class BaseBundler
public void send(Message msg) throws Exception
send
in interface Bundler
send
in class BaseBundler
Exception
protected void _sendBundledMessages()
protected void _addMessage(Message msg, long size)
protected static int assertPositive(int value, String message)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.