public class NAKACK extends Protocol implements Retransmitter.RetransmitCommand, DiagnosticsHandler.ProbeHandler
Modifier and Type | Field and Description |
---|---|
protected BoundedList<String> |
digest_history
Keeps a bounded list of the last N digest sets
|
protected int |
num_messages_received |
protected int |
num_messages_sent |
protected boolean |
print_stability_history_on_failed_xmit
When not finding a message on an XMIT request, include the last N
stability messages in the error message
|
protected BoundedList<Digest> |
stability_msgs
BoundedList
|
protected long |
xmit_stagger_timeout |
Constructor and Description |
---|
NAKACK() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkForRebroadcasts() |
void |
compact() |
Object |
down(Event evt)
Callback.
|
Map<String,Object> |
dumpStats() |
long |
getCurrentSeqno() |
Digest |
getDigest()
Returns a message digest: for each member P the highest delivered and received seqno is added
|
Digest |
getDigest(Address mbr) |
boolean |
getLogDiscardMessages() |
int |
getPendingXmitRequests() |
long |
getSizeOfAllMessages() |
long |
getSizeOfAllMessagesInclHeaders() |
NakReceiverWindow |
getWindow(Address mbr)
Please don't use this method; it is only provided for unit testing !
|
long |
getXmitRequestsReceived() |
long |
getXmitRequestsSent() |
long |
getXmitResponsesReceived() |
long |
getXmitResponsesSent() |
int |
getXmitTableMissingMessages() |
int |
getXmitTableSize() |
Map<String,String> |
handleProbe(String... keys)
Handles a probe.
|
void |
init()
Called after instance has been created (null constructor) and before protocol is started.
|
boolean |
isDiscardDeliveredMsgs() |
boolean |
isUseMcastXmit() |
boolean |
isXmitFromRandomMember() |
String |
printDigestHistory() |
String |
printLossRates() |
String |
printMessages() |
String |
printRetransmitStats() |
String |
printRetransmitTableSizes() |
String |
printStabilityHistory() |
String |
printStabilityMessages() |
String |
printStats() |
List<Integer> |
providedUpServices()
List of events that are provided to layers above (they will be handled when sent down from
above).
|
void |
resetStats() |
void |
retransmit(long first_seqno,
long last_seqno,
Address sender)
Implementation of Retransmitter.RetransmitCommand.
|
protected void |
retransmit(long first_seqno,
long last_seqno,
Address sender,
boolean multicast_xmit_request) |
void |
setDiscardDeliveredMsgs(boolean discard_delivered_msgs) |
void |
setLogDiscardMessages(boolean flag) |
void |
setLogDiscardMsgs(boolean flag) |
void |
setTimer(TimeScheduler timer)
Only used for unit tests, don't use !
|
void |
setUseMcastXmit(boolean use_mcast_xmit) |
void |
setXmitFromRandomMember(boolean xmit_from_random_member) |
void |
start()
This method is called on a
Channel.connect(String) . |
void |
stop()
This method is called on a
Channel.disconnect() . |
String[] |
supportedKeys()
Returns a list of supported keys
|
Object |
up(Event evt)
Callback.
|
destroy, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, isErgonomics, providedDownServices, requiredDownServices, requiredUpServices, resetStatistics, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled
protected long xmit_stagger_timeout
protected boolean print_stability_history_on_failed_xmit
protected int num_messages_sent
protected int num_messages_received
protected final BoundedList<Digest> stability_msgs
protected final BoundedList<String> digest_history
public long getXmitRequestsReceived()
public long getXmitRequestsSent()
public long getXmitResponsesReceived()
public long getXmitResponsesSent()
public int getPendingXmitRequests()
public int getXmitTableSize()
public int getXmitTableMissingMessages()
public long getSizeOfAllMessages()
public long getSizeOfAllMessagesInclHeaders()
public long getCurrentSeqno()
public String printRetransmitStats()
public NakReceiverWindow getWindow(Address mbr)
mbr
- public void setTimer(TimeScheduler timer)
timer
- public void resetStats()
resetStats
in class Protocol
public void init() throws Exception
Protocol
public boolean isUseMcastXmit()
public void setUseMcastXmit(boolean use_mcast_xmit)
public boolean isXmitFromRandomMember()
public void setXmitFromRandomMember(boolean xmit_from_random_member)
public boolean isDiscardDeliveredMsgs()
public void setDiscardDeliveredMsgs(boolean discard_delivered_msgs)
public void setLogDiscardMessages(boolean flag)
public void setLogDiscardMsgs(boolean flag)
public boolean getLogDiscardMessages()
public String printStats()
printStats
in class Protocol
public String printStabilityMessages()
public String printStabilityHistory()
public String printDigestHistory()
public String printLossRates()
public String printRetransmitTableSizes()
public void compact()
public List<Integer> providedUpServices()
Protocol
providedUpServices
in class Protocol
public void start() throws Exception
Protocol
Channel.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 Protocol
Exception
- Thrown if protocol cannot be started successfully. This will cause the ProtocolStack
to fail, so Channel.connect(String)
will throw an exceptionpublic void stop()
Protocol
Channel.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 flushedpublic Object down(Event evt)
Do not use down_prot.down()
in this
method as the event is passed down by default by the superclass after this method returns !
public Object up(Event evt)
Do not use PassUp
in this
method as the event is passed up by default by the superclass after this method returns !
protected void checkForRebroadcasts()
public Digest getDigest()
public void retransmit(long first_seqno, long last_seqno, Address sender)
retransmit
in interface Retransmitter.RetransmitCommand
first_seqno
- The sequence number of the first missing messagelast_seqno
- The sequence number of the last missing messagesender
- The destination of the member to which the retransmit request will be sent
(nak-based scheme), or to which the message will be retransmitted (ack-based scheme).protected void retransmit(long first_seqno, long last_seqno, Address sender, boolean multicast_xmit_request)
public String printMessages()
public Map<String,String> handleProbe(String... keys)
DiagnosticsHandler.ProbeHandler
handleProbe
in interface DiagnosticsHandler.ProbeHandler
public String[] supportedKeys()
DiagnosticsHandler.ProbeHandler
supportedKeys
in interface DiagnosticsHandler.ProbeHandler
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.