public class RingBufferBundlerLockless extends BaseBundler
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.atomic.AtomicLong |
accumulated_bytes |
protected Message[] |
buf |
protected Runner |
bundler_thread |
protected java.util.concurrent.atomic.AtomicInteger |
num_threads |
protected int |
read_index |
protected java.lang.Runnable |
run_function |
protected java.util.concurrent.atomic.AtomicInteger |
size |
protected java.lang.Runnable |
stop_function |
protected static java.lang.String |
THREAD_NAME |
protected java.util.concurrent.atomic.AtomicInteger |
tmp_write_index |
protected java.util.concurrent.atomic.AtomicBoolean |
unparking |
protected int |
write_index |
protected java.util.concurrent.atomic.AtomicInteger |
write_permits |
| Constructor and Description |
|---|
RingBufferBundlerLockless() |
RingBufferBundlerLockless(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
int |
_readMessages() |
protected int |
advanceWriteIndex() |
protected static int |
assertPositive(int value,
java.lang.String message) |
protected int |
getPermitToWrite() |
protected int |
getWriteIndex() |
protected int |
increment(int index) |
protected int |
index(int idx) |
void |
init(TP transport)
Called after creation of the bundler
|
protected int |
marshalMessagesToSameDestination(Address dest,
Message[] buf,
int start_index,
int available_msgs,
int max_bundle_size) |
int |
readIndex() |
protected void |
readMessages() |
void |
reset() |
void |
send(Message msg) |
protected int |
sendBundledMessages(Message[] buf,
int read_index,
int available_msgs)
Read and send messages in range [read-index ..
|
int |
size()
The number of unsent messages in the bundler
|
void |
start()
Called after
Bundler.init(TP) |
void |
stop() |
java.lang.String |
toString() |
int |
writeIndex() |
addMessage, checkForSharedTransport, clearMessages, sendBundledMessages, sendMessageList, sendSingleMessage, viewChangeprotected Message[] buf
protected int read_index
protected volatile int write_index
protected final java.util.concurrent.atomic.AtomicInteger tmp_write_index
protected final java.util.concurrent.atomic.AtomicInteger write_permits
protected final java.util.concurrent.atomic.AtomicInteger size
protected final java.util.concurrent.atomic.AtomicInteger num_threads
protected final java.util.concurrent.atomic.AtomicLong accumulated_bytes
protected final java.util.concurrent.atomic.AtomicBoolean unparking
protected Runner bundler_thread
protected static final java.lang.String THREAD_NAME
protected final java.lang.Runnable run_function
protected final java.lang.Runnable stop_function
public RingBufferBundlerLockless()
public RingBufferBundlerLockless(int capacity)
public int readIndex()
public int writeIndex()
public int size()
Bundlersize in interface Bundlersize in class BaseBundlerpublic void init(TP transport)
Bundlerinit in interface Bundlerinit in class BaseBundlertransport - the transport, for further referencepublic void reset()
public void start()
BundlerBundler.init(TP)start in interface Bundlerstart in class BaseBundlerpublic void stop()
stop in interface Bundlerstop in class BaseBundlerpublic void send(Message msg) throws java.lang.Exception
send in interface Bundlersend in class BaseBundlerjava.lang.Exceptionprotected int getWriteIndex()
protected int getPermitToWrite()
protected int advanceWriteIndex()
protected void readMessages()
protected int sendBundledMessages(Message[] buf, int read_index, int available_msgs)
public java.lang.String toString()
toString in class java.lang.Objectpublic int _readMessages()
protected int marshalMessagesToSameDestination(Address dest, Message[] buf, int start_index, int available_msgs, int max_bundle_size) throws java.lang.Exception
java.lang.Exceptionprotected final int increment(int index)
protected final int index(int idx)
protected static int assertPositive(int value,
java.lang.String message)
Copyright © 1998-2020 Red Hat. All Rights Reserved.