NakReceiverWindow.Listener
, Retransmitter.RetransmitCommand
public class NAKACK extends Protocol implements Retransmitter.RetransmitCommand, NakReceiverWindow.Listener
Modifier and Type | Field | Description |
---|---|---|
protected BoundedList<java.lang.String> |
merge_history |
|
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 | Description |
---|---|
NAKACK() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
down(Event evt) |
Callback.
|
java.util.Map<java.lang.String,java.lang.Object> |
dumpStats() |
|
double |
getAverageLossRate() |
|
double |
getAverageSmoothedLossRate() |
|
Digest |
getDigest() |
Returns a message digest: for each member P the lowest, highest delivered and highest received seqno is added
|
int |
getGcLag() |
|
int |
getMaxXmitBufSize() |
|
long |
getMaxXmitSize() |
Deprecated.
removed in 2.6
|
long |
getMissingMessagesReceived() |
|
java.lang.String |
getName() |
|
int |
getPendingRetransmissionRequests() |
|
int |
getReceivedTableSize() |
|
double |
getSmoothedAverageRetransmissionTime(Address sender) |
Returns the smoothed average retransmission time for a given sender
|
double |
getTotalAverageRetransmissionTime() |
|
double |
getTotalAverageSmoothedRetransmissionTime() |
|
long |
getXmitRequestsReceived() |
|
long |
getXmitRequestsSent() |
|
long |
getXmitResponsesReceived() |
|
long |
getXmitResponsesSent() |
|
int |
getXmitTableSize() |
|
void |
init() |
Called after instance has been created (null constructor) and before protocol is started.
|
boolean |
isDiscardDeliveredMsgs() |
|
boolean |
isLogDiscardMsgs() |
|
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) |
|
java.lang.String |
printLossRates() |
|
java.lang.String |
printMergeHistory() |
|
java.lang.String |
printMessages() |
|
java.lang.String |
printRetransmissionAvgs() |
|
java.lang.String |
printRetransmissionTimes() |
|
java.lang.String |
printSmoothedRetransmissionAvgs() |
|
java.lang.String |
printStabilityHistory() |
|
java.lang.String |
printStabilityMessages() |
|
java.lang.String |
printStats() |
|
java.util.Vector<java.lang.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) |
|
void |
setLogDiscardMsgs(boolean log_discard_msgs) |
|
void |
setMaxXmitBufSize(int max_xmit_buf_size) |
|
void |
setMaxXmitSize(long max_xmit_size) |
Deprecated.
removed in 2.6
|
boolean |
setProperties(java.util.Properties props) |
Configures the protocol initially.
|
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() . |
java.lang.Object |
up(Event evt) |
Callback.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy, downThreadEnabled, enableStats, getDownProtocol, getProperties, getProtocolStack, getThreadFactory, getTransport, getUpProtocol, providedDownServices, requiredDownServices, requiredUpServices, setDownProtocol, setPropertiesInternal, setProtocolStack, setUpProtocol, statsEnabled, upThreadEnabled
protected final BoundedList<Digest> stability_msgs
protected final BoundedList<java.lang.String> merge_history
protected boolean print_stability_history_on_failed_xmit
public long getXmitRequestsReceived()
public long getXmitRequestsSent()
public long getXmitResponsesReceived()
public long getXmitResponsesSent()
public long getMissingMessagesReceived()
public int getPendingRetransmissionRequests()
public int getXmitTableSize()
public int getReceivedTableSize()
public void resetStats()
resetStats
in class Protocol
public void init() throws java.lang.Exception
Protocol
public int getGcLag()
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)
public int getMaxXmitBufSize()
public void setMaxXmitBufSize(int max_xmit_buf_size)
public long getMaxXmitSize()
public void setMaxXmitSize(long max_xmit_size)
max_xmit_size
- public boolean isLogDiscardMsgs()
public void setLogDiscardMsgs(boolean log_discard_msgs)
public boolean setProperties(java.util.Properties props)
Protocol
"loopback=false;unicast_inport=4444"
setProperties
in class Protocol
public java.util.Map<java.lang.String,java.lang.Object> dumpStats()
public java.lang.String printStats()
printStats
in class Protocol
public java.lang.String printStabilityMessages()
public java.lang.String printStabilityHistory()
public java.lang.String printMergeHistory()
public java.lang.String printLossRates()
public double getAverageLossRate()
public double getAverageSmoothedLossRate()
public java.util.Vector<java.lang.Integer> providedUpServices()
Protocol
providedUpServices
in class Protocol
public void start() throws java.lang.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
java.lang.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 java.lang.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 java.lang.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 !
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 java.lang.String printMessages()
public java.lang.String printRetransmissionAvgs()
public java.lang.String printSmoothedRetransmissionAvgs()
public java.lang.String printRetransmissionTimes()
public double getTotalAverageRetransmissionTime()
public double getTotalAverageSmoothedRetransmissionTime()
public double getSmoothedAverageRetransmissionTime(Address sender)
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.