public class MaxOneThreadPerSender extends SubmitToThreadPool
MessageProcessingPolicy
which processes regular messages and message batches by
assigning a max of 1 thread per message from the same sender. So if we have sender A, B, C and D, we'll have no more
than 4 threads handling regular unicasts and 4 threads handling regular multicasts.See JGRP-2143 for details.
Modifier and Type | Class and Description |
---|---|
protected class |
MaxOneThreadPerSender.BatchHandlerLoop |
protected class |
MaxOneThreadPerSender.Entry |
protected class |
MaxOneThreadPerSender.MessageTable |
SubmitToThreadPool.BatchHandler, SubmitToThreadPool.SingleMessageHandler, SubmitToThreadPool.SingleMessageHandlerWithClusterName
Modifier and Type | Field and Description |
---|---|
protected int |
max_buffer_size |
protected MaxOneThreadPerSender.MessageTable |
mcasts |
protected boolean |
resize |
protected MaxOneThreadPerSender.MessageTable |
ucasts |
log, tp, tp_id
Constructor and Description |
---|
MaxOneThreadPerSender() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called before the transport is stopped
|
String |
dump() |
void |
init(TP transport)
Called after creation.
|
void |
loopback(Message msg,
boolean oob,
boolean internal)
Process a message that was not received from the transport but from above (e.g.
|
void |
process(MessageBatch batch,
boolean oob,
boolean internal)
Process a batch received from the transport
|
void |
process(Message msg,
boolean oob,
boolean internal)
Process a message received from the transport
|
void |
reset()
To reset stats
|
void |
viewChange(List<Address> members) |
removeAndDispatchNonBundledMessages
protected final MaxOneThreadPerSender.MessageTable mcasts
protected final MaxOneThreadPerSender.MessageTable ucasts
protected int max_buffer_size
protected boolean resize
public String dump()
public void reset()
MessageProcessingPolicy
public void init(TP transport)
MessageProcessingPolicy
init
in interface MessageProcessingPolicy
init
in class SubmitToThreadPool
public void destroy()
MessageProcessingPolicy
public void loopback(Message msg, boolean oob, boolean internal)
MessageProcessingPolicy
loopback
in interface MessageProcessingPolicy
loopback
in class SubmitToThreadPool
msg
- the message to be looped back up the stack.oob
- true if the message is an OOB messageinternal
- true if the message is internalpublic void process(Message msg, boolean oob, boolean internal)
MessageProcessingPolicy
process
in interface MessageProcessingPolicy
process
in class SubmitToThreadPool
msg
- the messageoob
- true if the message is an OOB messageinternal
- true if the message is internalpublic void process(MessageBatch batch, boolean oob, boolean internal)
MessageProcessingPolicy
process
in interface MessageProcessingPolicy
process
in class SubmitToThreadPool
batch
- the batchoob
- true if the batch contains only OOB messagesinternal
- true if the batch contains only internal messages (or internal and OOB messages)Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.