public class BaseBundler extends java.lang.Object implements Bundler
| Modifier and Type | Field and Description |
|---|---|
protected long |
count |
protected java.util.concurrent.locks.ReentrantLock |
lock |
protected Log |
log |
protected java.util.Map<SingletonAddress,java.util.List<Message>> |
msgs
Keys are destinations, values are lists of Messages
|
protected ByteArrayDataOutputStream |
output |
protected TP |
transport |
| Constructor and Description |
|---|
BaseBundler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addMessage(Message msg,
long size) |
protected void |
checkForSharedTransport(TP tp) |
protected void |
clearMessages() |
void |
init(TP transport)
Called after creation of the bundler
|
void |
send(Message msg) |
protected void |
sendBundledMessages()
Sends all messages in the map.
|
protected void |
sendMessageList(Address dest,
Address src,
byte[] cluster_name,
java.util.List<Message> list) |
protected void |
sendSingleMessage(Message msg) |
int |
size()
The number of unsent messages in the bundler
|
void |
start()
Called after
Bundler.init(TP) |
void |
stop() |
void |
viewChange(View view) |
protected final java.util.Map<SingletonAddress,java.util.List<Message>> msgs
protected TP transport
protected long count
protected final java.util.concurrent.locks.ReentrantLock lock
protected ByteArrayDataOutputStream output
protected Log log
public void init(TP transport)
Bundlerpublic void start()
BundlerBundler.init(TP)public void send(Message msg) throws java.lang.Exception
public void viewChange(View view)
viewChange in interface Bundlerpublic int size()
Bundlerprotected void sendBundledMessages()
protected void clearMessages()
protected void sendSingleMessage(Message msg)
protected void sendMessageList(Address dest, Address src, byte[] cluster_name, java.util.List<Message> list)
protected void addMessage(Message msg, long size)
protected void checkForSharedTransport(TP tp)
Copyright © 1998-2020 Red Hat. All Rights Reserved.