Class Entry

All Implemented Interfaces:
Serializable, Copyable
Direct Known Subclasses:
ItemEntry

public class Entry extends LayeredNetworkElement
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 Details

  • Constructor Details

  • Method Details

    • on

      public Entry on(Task newParent)
    • setArrival

      public Entry setArrival(Distribution arrival)
      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

      public Distribution getArrival()
      Gets the open arrival distribution for this entry.
      Returns:
      The arrival distribution, or null if not set
    • forward

      public Entry forward(Entry dest, double prob)
      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 to
      prob - The probability of forwarding (0.0 to 1.0)
      Returns:
      This entry for method chaining
    • forward

      public Entry forward(String destName, double prob)
      Add a forwarding call to another entry by name with a specified probability.
      Parameters:
      destName - The name of the destination entry
      prob - The probability of forwarding (0.0 to 1.0)
      Returns:
      This entry for method chaining
    • forward

      public Entry forward(Entry dest)
      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

      public Entry forward(String destName)
      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

      public Map<Integer,String> getForwardingDests()
      Get the map of forwarding destinations.
      Returns:
      Map of forwarding destination entry names
    • getForwardingProbs

      public Matrix getForwardingProbs()
      Get the matrix of forwarding probabilities.
      Returns:
      Matrix of forwarding probabilities
    • getBoundToActivity

      public Map<Integer,String> getBoundToActivity()
    • getReplyActivity

      public Map<Integer,String> getReplyActivity()
    • getParent

      public Task 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

      public Entry setType(String type)
      Sets the type of this entry.
      Parameters:
      type - The entry type (e.g., "PH1PH2", "NONE")
      Returns:
      this Entry for method chaining
    • getType

      public String getType()
      Gets the type of this entry.
      Returns:
      The entry type