Package jline.lang.layered
Class Entry
java.lang.Object
jline.lang.Element
jline.lang.layered.LayeredNetworkElement
jline.lang.layered.Entry
- All Implemented Interfaces:
Serializable,Copyable
- Direct Known Subclasses:
ItemEntry
An Entry represents a service interface exposed by a Task in a layered queueing network.
Entries define the points where external requests can enter a task and receive service. They act as the public interface of a task, similar to methods or endpoints in software systems. Each entry can receive requests from other tasks or from external arrival sources.
Key characteristics:
- Service interface: Defines what service the task provides to callers
- Arrival distribution: For open systems, the arrival process of external requests
- Activity binding: Can be bound to specific activities that implement the service
- Reply activity: Designates which activity sends the response back to the caller
Entries are essential for modeling service-oriented architectures, web services, database systems, and any system where tasks provide distinct services to clients.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Matrixprotected Taskprotected Matrixprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a forwarding call to another entry by name with probability 1.0.Add a forwarding call to another entry by name with a specified probability.Add a forwarding call to another entry with probability 1.0.Add a forwarding call to another entry with a specified probability.Gets the open arrival distribution for this entry.Get the map of forwarding destinations.Get the matrix of forwarding probabilities.getType()Gets the type of this entry.setArrival(Distribution arrival) Sets the open arrival process for this entry.Sets the type of this entry.protected voidvalidateForwardingProbability(double prob) Validate that a forwarding probability is valid and that the sum of all forwarding probabilities does not exceed 1.0.
-
Field Details
-
parent
-
type
-
boundToActivity
-
replyActivity
-
scheduling
-
forwardingDests
-
forwardingProbs
-
-
Constructor Details
-
Entry
-
-
Method Details
-
on
-
setArrival
Sets the open arrival process for this entry.- Parameters:
arrival- The arrival distribution (e.g., Exp, Erlang, HyperExp)- Returns:
- this Entry for method chaining
-
getArrival
Gets the open arrival distribution for this entry.- Returns:
- The arrival distribution, or null if not set
-
forward
Add a forwarding call to another entry with a specified probability. Forwarding allows this entry to redirect the reply to another entry instead of replying directly to the original caller.- Parameters:
dest- The destination entry to forward toprob- The probability of forwarding (0.0 to 1.0)- Returns:
- This entry for method chaining
-
forward
Add a forwarding call to another entry by name with a specified probability.- Parameters:
destName- The name of the destination entryprob- The probability of forwarding (0.0 to 1.0)- Returns:
- This entry for method chaining
-
forward
Add a forwarding call to another entry with probability 1.0.- Parameters:
dest- The destination entry to forward to- Returns:
- This entry for method chaining
-
forward
Add a forwarding call to another entry by name with probability 1.0.- Parameters:
destName- The name of the destination entry- Returns:
- This entry for method chaining
-
getForwardingDests
Get the map of forwarding destinations.- Returns:
- Map of forwarding destination entry names
-
getForwardingProbs
Get the matrix of forwarding probabilities.- Returns:
- Matrix of forwarding probabilities
-
getBoundToActivity
-
getReplyActivity
-
getParent
-
validateForwardingProbability
protected void validateForwardingProbability(double prob) Validate that a forwarding probability is valid and that the sum of all forwarding probabilities does not exceed 1.0.- Parameters:
prob- The probability to validate- Throws:
IllegalArgumentException- if probability is invalid or sum exceeds 1.0
-
setType
Sets the type of this entry.- Parameters:
type- The entry type (e.g., "PH1PH2", "NONE")- Returns:
- this Entry for method chaining
-
getType
Gets the type of this entry.- Returns:
- The entry type
-