public class NAKACK extends Protocol implements Retransmitter.RetransmitCommand, NakReceiverWindow.Listener, TP.ProbeHandler
Modifier and Type | Field and Description |
---|---|
protected BoundedList<String> |
digest_history
Keeps a bounded list of the last N digest sets
|
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
|
Constructor and Description |
---|
NAKACK() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkForRebroadcasts() |
void |
compact() |
Object |
down(Event evt)
Callback.
|
Map<String,Object> |
dumpStats() |
double |
getAverageLossRate() |
double |
getAverageSmoothedLossRate() |
long |
getCurrentSeqno() |
Digest |
getDigest()
Returns a message digest: for each member P the lowest, highest delivered and highest received seqno is added
|
int |
getGcLag()
Deprecated.
|
boolean |
getLogDiscardMessages() |
static int |
getMaxXmitBufSize()
Deprecated.
|
static long |
getMaxXmitSize()
Deprecated.
removed in 2.6
|
long |
getMissingMessagesReceived() |
int |
getPendingRetransmissionRequests() |
int |
getReceivedTableSize() |
double |
getSmoothedAverageRetransmissionTime(Address sender)
Returns the smoothed average retransmission time for a given sender
|
double |
getTotalAverageRetransmissionTime() |
double |
getTotalAverageSmoothedRetransmissionTime() |
static int |
getUndeliveredMessages()
Deprecated.
|
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 |
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() |
void |
messageGapDetected(long from,
long to,
Address src)
Called when a message gap is detected
|
void |
missingMessageReceived(long seqno,
Address original_sender) |
String |
printDigestHistory() |
String |
printLossRates() |
String |
printMessages() |
String |
printRetransmissionAvgs() |
String |
printRetransmissionTimes() |
String |
printRetransmitStats() |
String |
printRetransmitTableSizes() |
String |
printSmoothedRetransmissionAvgs() |
String |
printStabilityHistory() |
String |
printStabilityMessages() |
String |
printStats() |
String |
printXmitHistory() |
Vector<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 |
setGcLag(int gc_lag)
Deprecated.
|
void |
setLogDiscardMessages(boolean flag) |
void |
setLogDiscardMsgs(boolean flag) |
static void |
setMaxXmitBufSize(int max_xmit_buf_size)
Deprecated.
|
void |
setMaxXmitSize(long max_xmit_size)
Deprecated.
removed in 2.6
|
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, downThreadEnabled, enableStats, getConfigurableObjects, getDownProtocol, getId, getLevel, getName, getProperties, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getValue, isErgonomics, providedDownServices, requiredDownServices, requiredUpServices, setDownProtocol, setErgonomics, setId, setLevel, setProperties, setPropertiesInternal, setProperty, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, statsEnabled, upThreadEnabled
protected boolean print_stability_history_on_failed_xmit
protected final BoundedList<Digest> stability_msgs
protected final BoundedList<String> digest_history
@Deprecated public static int getUndeliveredMessages()
public long getXmitRequestsReceived()
public long getXmitRequestsSent()
public long getXmitResponsesReceived()
public long getXmitResponsesSent()
public long getMissingMessagesReceived()
public int getPendingRetransmissionRequests()
public int getXmitTableSize()
public long getCurrentSeqno()
public String printRetransmitStats()
public int getReceivedTableSize()
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
@Deprecated public int getGcLag()
@Deprecated public void setGcLag(int gc_lag)
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)
@Deprecated public static int getMaxXmitBufSize()
@Deprecated public static void setMaxXmitBufSize(int max_xmit_buf_size)
public static long getMaxXmitSize()
public void setMaxXmitSize(long max_xmit_size)
max_xmit_size
- 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 double getAverageLossRate()
public double getAverageSmoothedLossRate()
public Vector<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 void missingMessageReceived(long seqno, Address original_sender)
missingMessageReceived
in interface NakReceiverWindow.Listener
public void messageGapDetected(long from, long to, Address src)
messageGapDetected
in interface NakReceiverWindow.Listener
public String printMessages()
public String printRetransmissionAvgs()
public String printSmoothedRetransmissionAvgs()
public String printRetransmissionTimes()
public String printXmitHistory()
public double getTotalAverageRetransmissionTime()
public double getTotalAverageSmoothedRetransmissionTime()
public double getSmoothedAverageRetransmissionTime(Address sender)
public Map<String,String> handleProbe(String... keys)
TP.ProbeHandler
handleProbe
in interface TP.ProbeHandler
public String[] supportedKeys()
TP.ProbeHandler
supportedKeys
in interface TP.ProbeHandler
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.