public class RingBufferBundlerLockless2 extends BaseBundler
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.atomic.AtomicLong |
accumulated_bytes |
protected Message[] |
buf |
protected Runner |
bundler_thread |
static Message |
NULL_MSG |
protected java.util.concurrent.atomic.AtomicInteger |
num_threads |
protected java.util.concurrent.atomic.AtomicInteger |
read_index |
protected int |
ri |
protected java.lang.Runnable |
run_function |
protected java.lang.Runnable |
stop_function |
protected static java.lang.String |
THREAD_NAME |
protected java.util.concurrent.atomic.AtomicBoolean |
unparking |
protected java.util.concurrent.atomic.AtomicInteger |
write_index |
| Constructor and Description |
|---|
RingBufferBundlerLockless2() |
RingBufferBundlerLockless2(int capacity) |
RingBufferBundlerLockless2(int capacity,
boolean padded) |
| Modifier and Type | Method and Description |
|---|---|
int |
_readMessages() |
protected int |
_size(int ri,
int wi) |
protected boolean |
advanceReadIndex(int wi) |
protected static int |
assertPositive(int value,
java.lang.String message) |
protected int |
getWriteIndex(int current_read_index) |
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 end_index,
int max_bundle_size) |
int |
readIndex() |
protected void |
readMessages() |
RingBufferBundlerLockless2 |
reset() |
void |
send(Message msg) |
protected int |
sendBundledMessages(Message[] buf,
int read_index,
int write_index)
Read and send messages in range [read-index+1 ..
|
int |
size()
The number of unsent messages in the bundler
|
void |
start()
Called after
Bundler.init(TP) |
void |
stop() |
java.lang.String |
toString() |
protected void |
unparkIfNeeded(long size) |
int |
writeIndex() |
addMessage, checkForSharedTransport, clearMessages, sendBundledMessages, sendMessageList, sendSingleMessage, viewChangeprotected Message[] buf
protected final java.util.concurrent.atomic.AtomicInteger read_index
protected int ri
protected final java.util.concurrent.atomic.AtomicInteger write_index
protected final java.util.concurrent.atomic.AtomicLong accumulated_bytes
protected final java.util.concurrent.atomic.AtomicInteger num_threads
protected final java.util.concurrent.atomic.AtomicBoolean unparking
protected Runner bundler_thread
protected static final java.lang.String THREAD_NAME
public static final Message NULL_MSG
protected final java.lang.Runnable run_function
protected final java.lang.Runnable stop_function
public RingBufferBundlerLockless2()
public RingBufferBundlerLockless2(int capacity)
public RingBufferBundlerLockless2(int capacity,
boolean padded)
public int readIndex()
public int writeIndex()
public RingBufferBundlerLockless2 reset()
public int size()
Bundlersize in interface Bundlersize in class BaseBundlerprotected int _size(int ri,
int wi)
public void init(TP transport)
Bundlerinit in interface Bundlerinit in class BaseBundlertransport - the transport, for further referencepublic 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.Exceptionpublic java.lang.String toString()
toString in class java.lang.Objectprotected void unparkIfNeeded(long size)
protected int getWriteIndex(int current_read_index)
public int _readMessages()
protected boolean advanceReadIndex(int wi)
protected void readMessages()
protected int sendBundledMessages(Message[] buf, int read_index, int write_index)
protected int marshalMessagesToSameDestination(Address dest, Message[] buf, int start_index, int end_index, 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.