Open Kilda Java Documentation
org.openkilda.messaging.model.DiscoveryNode Class Reference
Inheritance diagram for org.openkilda.messaging.model.DiscoveryNode:

Public Member Functions

 DiscoveryNode (String switchId, String portId, int checkInterval, int forlornThreshold)
 
 DiscoveryNode (@JsonProperty("switch_id") final String switchId, @JsonProperty("port_id") final String portId, @JsonProperty("attempts") final int attempts, @JsonProperty("time_counter") final int timeCounter, @JsonProperty("check_interval") final int checkInterval, @JsonProperty("consecutive_failure") final int consecutiveFailure, @JsonProperty("consecutive_success") final int consecutiveSuccess, @JsonProperty("forlorn_threshold") final int forlornThreshold, @JsonProperty("found_isl") final boolean foundIsl)
 
void setFoundIsl (boolean foundIsl)
 
boolean isFoundIsl ()
 
void renew ()
 
boolean forlorn ()
 
void clearConsecutiveFailure ()
 
void clearConsecutiveSuccess ()
 
int getConsecutiveFailure ()
 
int getConsecutiveSuccess ()
 
void incConsecutiveFailure ()
 
void incConsecutiveSuccess ()
 
int getTicks ()
 
void incTick ()
 
void resetTickCounter ()
 
boolean maxAttempts (Integer attemptLimit)
 
void incAttempts ()
 
int getAttempts ()
 
boolean timeToCheck ()
 
String getSwitchId ()
 
String getPortId ()
 
boolean equals (Object o)
 
int hashCode ()
 
String toString ()
 

Static Public Attributes

static final int FORLORN_NEVER = -1
 

Detailed Description

Definition at line 15 of file DiscoveryNode.java.

Constructor & Destructor Documentation

◆ DiscoveryNode() [1/2]

org.openkilda.messaging.model.DiscoveryNode.DiscoveryNode ( String  switchId,
String  portId,
int  checkInterval,
int  forlornThreshold 
)

TODO: forlornThreshold is understandable (ie point at which to stop checking), but regarding method signatures, it is very similar to DiscoverManager, which uses consecutive failure limit, which is a different concept compared to forlorn.

Definition at line 70 of file DiscoveryNode.java.

◆ DiscoveryNode() [2/2]

org.openkilda.messaging.model.DiscoveryNode.DiscoveryNode ( @JsonProperty("switch_id") final String  switchId,
@JsonProperty("port_id") final String  portId,
@JsonProperty("attempts") final int  attempts,
@JsonProperty("time_counter") final int  timeCounter,
@JsonProperty("check_interval") final int  checkInterval,
@JsonProperty("consecutive_failure") final int  consecutiveFailure,
@JsonProperty("consecutive_success") final int  consecutiveSuccess,
@JsonProperty("forlorn_threshold") final int  forlornThreshold,
@JsonProperty("found_isl") final boolean  foundIsl 
)

Definition at line 82 of file DiscoveryNode.java.

Member Function Documentation

◆ clearConsecutiveFailure()

void org.openkilda.messaging.model.DiscoveryNode.clearConsecutiveFailure ( )

Definition at line 132 of file DiscoveryNode.java.

◆ clearConsecutiveSuccess()

void org.openkilda.messaging.model.DiscoveryNode.clearConsecutiveSuccess ( )

Definition at line 136 of file DiscoveryNode.java.

◆ equals()

boolean org.openkilda.messaging.model.DiscoveryNode.equals ( Object  o)

Definition at line 197 of file DiscoveryNode.java.

◆ forlorn()

boolean org.openkilda.messaging.model.DiscoveryNode.forlorn ( )
Returns
true if consecutiveFailure is greater than limit

Definition at line 125 of file DiscoveryNode.java.

◆ getAttempts()

int org.openkilda.messaging.model.DiscoveryNode.getAttempts ( )

Definition at line 180 of file DiscoveryNode.java.

◆ getConsecutiveFailure()

int org.openkilda.messaging.model.DiscoveryNode.getConsecutiveFailure ( )

Definition at line 140 of file DiscoveryNode.java.

◆ getConsecutiveSuccess()

int org.openkilda.messaging.model.DiscoveryNode.getConsecutiveSuccess ( )

Definition at line 144 of file DiscoveryNode.java.

◆ getPortId()

String org.openkilda.messaging.model.DiscoveryNode.getPortId ( )

Definition at line 192 of file DiscoveryNode.java.

◆ getSwitchId()

String org.openkilda.messaging.model.DiscoveryNode.getSwitchId ( )

Definition at line 188 of file DiscoveryNode.java.

◆ getTicks()

int org.openkilda.messaging.model.DiscoveryNode.getTicks ( )

Definition at line 156 of file DiscoveryNode.java.

◆ hashCode()

int org.openkilda.messaging.model.DiscoveryNode.hashCode ( )

Definition at line 210 of file DiscoveryNode.java.

◆ incAttempts()

void org.openkilda.messaging.model.DiscoveryNode.incAttempts ( )

Definition at line 176 of file DiscoveryNode.java.

◆ incConsecutiveFailure()

void org.openkilda.messaging.model.DiscoveryNode.incConsecutiveFailure ( )

Definition at line 148 of file DiscoveryNode.java.

◆ incConsecutiveSuccess()

void org.openkilda.messaging.model.DiscoveryNode.incConsecutiveSuccess ( )

Definition at line 152 of file DiscoveryNode.java.

◆ incTick()

void org.openkilda.messaging.model.DiscoveryNode.incTick ( )

Definition at line 160 of file DiscoveryNode.java.

◆ isFoundIsl()

boolean org.openkilda.messaging.model.DiscoveryNode.isFoundIsl ( )

Definition at line 108 of file DiscoveryNode.java.

◆ maxAttempts()

boolean org.openkilda.messaging.model.DiscoveryNode.maxAttempts ( Integer  attemptLimit)
Parameters
attemptLimitthe limit to test against
Returns
true if attempts is greater than attemptLimit.

Definition at line 172 of file DiscoveryNode.java.

◆ renew()

void org.openkilda.messaging.model.DiscoveryNode.renew ( )

Whereas renew is called when a successful Discovery is received, it isn't the place to put "foundIsl". This is out of fear that renew() could be called from somewhere else. The semantics of "renew" doesn't say "found ISL"

Definition at line 117 of file DiscoveryNode.java.

◆ resetTickCounter()

void org.openkilda.messaging.model.DiscoveryNode.resetTickCounter ( )

Definition at line 164 of file DiscoveryNode.java.

◆ setFoundIsl()

void org.openkilda.messaging.model.DiscoveryNode.setFoundIsl ( boolean  foundIsl)

Definition at line 104 of file DiscoveryNode.java.

◆ timeToCheck()

boolean org.openkilda.messaging.model.DiscoveryNode.timeToCheck ( )

Definition at line 184 of file DiscoveryNode.java.

◆ toString()

String org.openkilda.messaging.model.DiscoveryNode.toString ( )

Definition at line 215 of file DiscoveryNode.java.

Member Data Documentation

◆ FORLORN_NEVER

final int org.openkilda.messaging.model.DiscoveryNode.FORLORN_NEVER = -1
static

Never stop checking for an ISL

Definition at line 18 of file DiscoveryNode.java.


The documentation for this class was generated from the following file: