Modifier and Type | Field and Description |
---|---|
protected Future<?> |
credit_send_task |
protected int |
max_queue_size |
protected Consumer<Message> |
send_function |
sent, UFC_CREDIT_REQUEST_HDR, UFC_REPLENISH_HDR
frag_size, local_addr, max_block_time, max_block_times, max_credits, min_credits, min_threshold, num_credit_requests_received, num_credit_requests_sent, num_credit_responses_received, num_credit_responses_sent, received, running
after_creation_hook, down_prot, ergonomics, id, log, stack, stats, up_prot
Constructor and Description |
---|
UFC_NB() |
Modifier and Type | Method and Description |
---|---|
protected <T extends Credit> |
createCredit(int initial_credits) |
int |
getMaxQueueSize() |
int |
getNumberOfQueuedMessages() |
int |
getNumberOfQueuings() |
int |
getQueuedMessagesTo(Address dest) |
int |
getQueuedSize() |
protected Object |
handleDownMessage(Message msg) |
boolean |
isQueuingTo(Address dest) |
protected void |
sendCreditRequestsIfNeeded()
Checks the sent table: if some credits are in queueing mode and credits left are less than min_credits:
send a credit request
|
UFC_NB |
setMaxQueueSize(int s) |
void |
start()
This method is called on a
JChannel.connect(String) . |
void |
stop()
This method is called on a
JChannel.disconnect() . |
getAverageTimeBlocked, getCreditRequestHeader, getNumberOfBlockings, getReplenishHeader, handleCredit, handleMulticastMessage, handleViewChange, init, printCredits, printSenderCredits, resetStats, unblock
adjustCredit, bufferToLong, down, down, getMaxBlockTime, getMaxBlockTime, getMaxBlockTimes, getMaxCredits, getMinCredits, getMinThreshold, getNumberOfCreditRequestsReceived, getNumberOfCreditRequestsSent, getNumberOfCreditResponsesReceived, getNumberOfCreditResponsesSent, handleConfigEvent, handleCreditRequest, handleUpEvent, longToBuffer, printMap, printReceiverCredits, sendCredit, sendCreditRequest, setMaxBlockTime, setMaxBlockTimes, setMaxCredits, setMinCredits, setMinThreshold, up, up, up
accept, afterCreationHook, destroy, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProperties, setProtocolStack, setSocketFactory, setUpProtocol, setValue, statsEnabled
protected int max_queue_size
protected Future<?> credit_send_task
public int getMaxQueueSize()
public UFC_NB setMaxQueueSize(int s)
public int getNumberOfQueuedMessages()
public int getQueuedSize()
public int getNumberOfQueuings()
public boolean isQueuingTo(Address dest)
public int getQueuedMessagesTo(Address dest)
public void start() throws Exception
Protocol
JChannel.connect(String)
. Starts work.
Protocols are connected and queues are ready to receive events.
Will be called from bottom to top. This call will replace
the START and START_OK events.start
in class FlowControl
Exception
- Thrown if protocol cannot be started successfully. This will cause the ProtocolStack
to fail, so JChannel.connect(String)
will throw an exceptionpublic void stop()
Protocol
JChannel.disconnect()
. Stops work (e.g. by closing multicast socket).
Will be called from top to bottom. This means that at the time of the method invocation the
neighbor protocol below is still working. This method will replace the
STOP, STOP_OK, CLEANUP and CLEANUP_OK events. The ProtocolStack guarantees that
when this method is called all messages in the down queue will have been flushedprotected Object handleDownMessage(Message msg)
handleDownMessage
in class UFC
protected <T extends Credit> T createCredit(int initial_credits)
createCredit
in class UFC
protected void sendCreditRequestsIfNeeded()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.