Package org.jgroups.util
Class MaxOneThreadPerSender.Entry
- java.lang.Object
-
- org.jgroups.util.MaxOneThreadPerSender.Entry
-
- Enclosing class:
- MaxOneThreadPerSender
protected class MaxOneThreadPerSender.Entry extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.concurrent.atomic.AtomicInteger
adders
protected MessageBatch
batch
protected AsciiString
cluster_name
protected static int
DEFAULT_INCREMENT
protected static int
DEFAULT_INITIAL_CAPACITY
protected java.util.concurrent.locks.Lock
lock
protected boolean
mcast
protected FastArray<Message>
msg_queue
protected java.util.concurrent.atomic.LongAdder
queued_msgs
protected Address
sender
protected java.util.concurrent.atomic.LongAdder
submitted_batches
-
Constructor Summary
Constructors Modifier Constructor Description protected
Entry(Address sender, boolean mcast, AsciiString cluster_name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
process(Message msg, boolean loopback)
protected boolean
process(MessageBatch batch, boolean loopback)
MaxOneThreadPerSender.Entry
reset()
protected boolean
submit(boolean loopback)
java.lang.String
toString()
MaxOneThreadPerSender.Entry
trimToInitialCapacity()
protected boolean
workAvailable()
Called byMaxOneThreadPerSender.BatchHandlerLoop
.
-
-
-
Field Detail
-
lock
protected final java.util.concurrent.locks.Lock lock
-
mcast
protected final boolean mcast
-
batch
protected final MessageBatch batch
-
sender
protected final Address sender
-
cluster_name
protected final AsciiString cluster_name
-
adders
protected final java.util.concurrent.atomic.AtomicInteger adders
-
submitted_batches
protected final java.util.concurrent.atomic.LongAdder submitted_batches
-
queued_msgs
protected final java.util.concurrent.atomic.LongAdder queued_msgs
-
DEFAULT_INITIAL_CAPACITY
protected static final int DEFAULT_INITIAL_CAPACITY
- See Also:
- Constant Field Values
-
DEFAULT_INCREMENT
protected static final int DEFAULT_INCREMENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Entry
protected Entry(Address sender, boolean mcast, AsciiString cluster_name)
-
-
Method Detail
-
reset
public MaxOneThreadPerSender.Entry reset()
-
trimToInitialCapacity
public MaxOneThreadPerSender.Entry trimToInitialCapacity()
-
process
protected boolean process(Message msg, boolean loopback)
-
process
protected boolean process(MessageBatch batch, boolean loopback)
-
submit
protected boolean submit(boolean loopback)
-
workAvailable
protected boolean workAvailable()
Called byMaxOneThreadPerSender.BatchHandlerLoop
. Atomically transfer messages from the entry.msg_queue to entry.batch and returns true if messages were transferred.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-