Package net.messagevortex.router
Class Edge
java.lang.Object
net.messagevortex.router.Edge
Represents a graph between two identity blocks inclusive senders operation and time.
-
Constructor Summary
ConstructorsConstructorDescriptionEdge(IdentityStoreBlock from, IdentityStoreBlock to, long startTime, long maxDelay) Represents a router graph during sending. -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongGets the maximum delay time a router may choose to delay the edge starting at the start time.getFrom()Get the sending entity.longGets the start time of the edge relative to the graphsets start.getTo()Get the receiving entity.inthashCode()longsetDelayTime(long newMaxDelay) Sets the maximum delay time a router may choose to delay the edge starting at the start time.longsetStartTime(long newStartTime) Sets the start time of the edge relative to the start time of the graph set.toString()
-
Constructor Details
-
Edge
Represents a router graph during sending.
- Parameters:
from- The starting point of the graphto- The ending point of the graphstartTime- 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 equalNullPointerException- if one of the parameters is null
-
-
Method Details
-
getFrom
Get the sending entity.
- Returns:
- The sending entity
-
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
-
hashCode
public int hashCode() -
toString
-