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

Public Member Functions

 DiscoveryLink (SwitchId srcSwitch, int srcPort, int checkInterval, int consecutiveFailureLimit)
 
 DiscoveryLink (SwitchId srcSwitch, int srcPort, SwitchId dstSwitch, int dstPort, int checkInterval, int consecutiveFailureLimit, boolean active)
 
 DiscoveryLink (@JsonProperty("source") final NetworkEndpoint source, @JsonProperty("destination") final NetworkEndpoint destination, @JsonProperty("attempts") final int attempts, @JsonProperty("ack_attempts") final int ackAttempts, @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("consecutive_failure_limit") final int consecutiveFailureLimit, @JsonProperty("active") final boolean active)
 
void activate (NetworkEndpoint destination)
 
void deactivate ()
 
void renew ()
 
boolean isNewAttemptAllowed ()
 
void clearConsecutiveFailure ()
 
void clearConsecutiveSuccess ()
 
void fail ()
 
void success ()
 
void tick ()
 
void resetTickCounter ()
 
boolean isAttemptsLimitExceeded (int attemptsLimit)
 
void incAttempts ()
 
boolean isAckAttemptsLimitExceeded (int attemptsLimit)
 
void incAcknowledgedAttempts ()
 
boolean timeToCheck ()
 
boolean isDestinationChanged (SwitchId dstSwitch, int dstPort)
 
boolean equals (Object o)
 
int hashCode ()
 

Static Public Attributes

static final int ENDLESS_ATTEMPTS = -1
 

Detailed Description

Definition at line 32 of file DiscoveryLink.java.

Constructor & Destructor Documentation

◆ DiscoveryLink() [1/3]

org.openkilda.messaging.model.DiscoveryLink.DiscoveryLink ( SwitchId  srcSwitch,
int  srcPort,
int  checkInterval,
int  consecutiveFailureLimit 
)

Constructor with non-defined destination of the ISL.

Definition at line 81 of file DiscoveryLink.java.

◆ DiscoveryLink() [2/3]

org.openkilda.messaging.model.DiscoveryLink.DiscoveryLink ( SwitchId  srcSwitch,
int  srcPort,
SwitchId  dstSwitch,
int  dstPort,
int  checkInterval,
int  consecutiveFailureLimit,
boolean  active 
)

Constructor with defined destination of the ISL.

Definition at line 94 of file DiscoveryLink.java.

◆ DiscoveryLink() [3/3]

org.openkilda.messaging.model.DiscoveryLink.DiscoveryLink ( @JsonProperty("source") final NetworkEndpoint  source,
@JsonProperty("destination") final NetworkEndpoint  destination,
@JsonProperty("attempts") final int  attempts,
@JsonProperty("ack_attempts") final int  ackAttempts,
@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("consecutive_failure_limit") final int  consecutiveFailureLimit,
@JsonProperty("active") final boolean  active 
)

Main constructor for deserialization by jackson.

Definition at line 110 of file DiscoveryLink.java.

Member Function Documentation

◆ activate()

void org.openkilda.messaging.model.DiscoveryLink.activate ( NetworkEndpoint  destination)

Activate the ISL.

Definition at line 135 of file DiscoveryLink.java.

◆ clearConsecutiveFailure()

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

Definition at line 172 of file DiscoveryLink.java.

◆ clearConsecutiveSuccess()

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

Definition at line 176 of file DiscoveryLink.java.

◆ deactivate()

void org.openkilda.messaging.model.DiscoveryLink.deactivate ( )

Deactivating of an ISL. We do not remove the destination of the ISL, because such data helps us to define whether ISL is moved or not.

Definition at line 144 of file DiscoveryLink.java.

◆ equals()

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

Definition at line 247 of file DiscoveryLink.java.

◆ fail()

void org.openkilda.messaging.model.DiscoveryLink.fail ( )

Definition at line 180 of file DiscoveryLink.java.

◆ hashCode()

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

Definition at line 260 of file DiscoveryLink.java.

◆ incAcknowledgedAttempts()

void org.openkilda.messaging.model.DiscoveryLink.incAcknowledgedAttempts ( )

Increases amount of acknowledged attempts.

Definition at line 223 of file DiscoveryLink.java.

◆ incAttempts()

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

Increases amount of attempts.

Definition at line 208 of file DiscoveryLink.java.

◆ isAckAttemptsLimitExceeded()

boolean org.openkilda.messaging.model.DiscoveryLink.isAckAttemptsLimitExceeded ( int  attemptsLimit)

Checks if we should stop trying to discover isl, because of the limit of attempts.

Returns
true if attempts is greater than attemptLimit.

Definition at line 216 of file DiscoveryLink.java.

◆ isAttemptsLimitExceeded()

boolean org.openkilda.messaging.model.DiscoveryLink.isAttemptsLimitExceeded ( int  attemptsLimit)

Checks if limit of not acknowledged attempts is exceeded.

Returns
true if attempts is greater than attemptLimit.

Definition at line 201 of file DiscoveryLink.java.

◆ isDestinationChanged()

boolean org.openkilda.messaging.model.DiscoveryLink.isDestinationChanged ( SwitchId  dstSwitch,
int  dstPort 
)

Checks whether destination switch/port of that link differs.

Parameters
dstSwitchdestination switch.
dstPortdestination port.
Returns
true if destination changed.

Definition at line 237 of file DiscoveryLink.java.

◆ isNewAttemptAllowed()

boolean org.openkilda.messaging.model.DiscoveryLink.isNewAttemptAllowed ( )

Checks if discovery should be suspended for that link or we can try to discover it.

Returns
true if link should be excluded from discovery plan and discovery packets should not be sent.

Definition at line 165 of file DiscoveryLink.java.

◆ renew()

void org.openkilda.messaging.model.DiscoveryLink.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 155 of file DiscoveryLink.java.

◆ resetTickCounter()

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

Definition at line 193 of file DiscoveryLink.java.

◆ success()

void org.openkilda.messaging.model.DiscoveryLink.success ( )

Definition at line 185 of file DiscoveryLink.java.

◆ tick()

void org.openkilda.messaging.model.DiscoveryLink.tick ( )

Definition at line 189 of file DiscoveryLink.java.

◆ timeToCheck()

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

Definition at line 227 of file DiscoveryLink.java.

Member Data Documentation

◆ ENDLESS_ATTEMPTS

final int org.openkilda.messaging.model.DiscoveryLink.ENDLESS_ATTEMPTS = -1
static

Means to never stop to check even failed ISL.

Definition at line 37 of file DiscoveryLink.java.


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