Class Edge

java.lang.Object
net.messagevortex.router.Edge

public class Edge extends Object

Represents a graph between two identity blocks inclusive senders operation and time.

  • Constructor Details

    • Edge

      public Edge(IdentityStoreBlock from, IdentityStoreBlock to, long startTime, long maxDelay)

      Represents a router graph during sending.

      Parameters:
      from - The starting point of the graph
      to - The ending point of the graph
      startTime - The starting time relative to the GraphSet start (in ms)
      maxDelay - The maximum delay after the start of this graph (in ms)
      Throws:
      IllegalArgumentException - if from and two are equal
      NullPointerException - if one of the parameters is null
  • Method Details

    • getFrom

      public IdentityStoreBlock getFrom()

      Get the sending entity.

      Returns:
      The sending entity
    • getTo

      public IdentityStoreBlock getTo()

      Get the receiving entity.

      Returns:
      The receiving entity
    • getStartTime

      public long getStartTime()

      Gets the start time of the edge relative to the graphsets start.

      Returns:
      the currently set start time
    • setStartTime

      public long setStartTime(long newStartTime)

      Sets the start time of the edge relative to the start time of the graph set.

      Parameters:
      newStartTime - the time to be set in millis
      Returns:
      the previously set time
    • getDelayTime

      public long getDelayTime()

      Gets the maximum delay time a router may choose to delay the edge starting at the start time.

      Returns:
      the currently set maximum delay time
    • setDelayTime

      public long setDelayTime(long newMaxDelay)

      Sets the maximum delay time a router may choose to delay the edge starting at the start time.

      Parameters:
      newMaxDelay - the new maximum time to be set
      Returns:
      the previously set maximum delay time
    • equals

      public boolean equals(Object t)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object