Class CacheRetrievalSystemModel

java.lang.Object
jline.examples.java.basic.CacheRetrievalSystemModel

public class CacheRetrievalSystemModel extends Object
Builders for cache models that use a retrieval system (delayed hits).

When a request misses the cache, the missed item is fetched through a retrieval system — a user-defined sub-network of queues. While the retrieval is pending, repeat requests for the same item become "delayed hits". See Cache.setRetrievalSystem(jline.lang.JobClass, jline.lang.JobClass, jline.lang.nodes.Queue[]).

See Also:
  • Constructor Details

    • CacheRetrievalSystemModel

      public CacheRetrievalSystemModel()
  • Method Details

    • simple_retrieval_system_model

      public static Network simple_retrieval_system_model(double[] accessProb, double[] serviceRates, String itemLevelCap, SchedStrategy sched)
      Cache model with a single retrieval queue. The number of items n is inferred from serviceRates.length.
      Parameters:
      accessProb - access probabilities for each item
      serviceRates - per-item retrieval service rates
      itemLevelCap - MATLAB-style string defining per-level cache capacity (e.g. "[1]", "[1,2]")
      sched - scheduling strategy for the retrieval queue
      Returns:
      Network of the simple cache model
    • simple_retrieval_system_model

      public static Network simple_retrieval_system_model(double[] accessProb, double[] serviceRates, String itemLevelCap, SchedStrategy sched, ReplacementStrategy replStrat)
    • chain_retrieval_system_model

      public static Network chain_retrieval_system_model(double[] accessProb, Matrix serviceRates, int nQueues, String itemLevelCap, SchedStrategy sched)
      Cache model with a chained retrieval system. On a miss, jobs traverse Queue_1 -> ... -> Queue_nQueues before returning to the cache. The number of items n is inferred from the columns of serviceRates.
      Parameters:
      accessProb - access probabilities for each item
      serviceRates - per-queue per-item retrieval service rates [nQueues x nItems]
      nQueues - number of queues in the retrieval chain
      itemLevelCap - MATLAB-style string defining per-level cache capacity (e.g. "[1]", "[1,2]")
      sched - scheduling strategy for the retrieval queues
      Returns:
      Network of the chain retrieval system model
    • retrieval_system_with_probabilistic_routing

      public static Network retrieval_system_with_probabilistic_routing(double[] accessProb, Matrix serviceRates, Matrix[] routingMatrices, String itemLevelCap, SchedStrategy sched)
      Cache model with probabilistic per-item routing through a retrieval system of 3 queues (one infinite-server, two scheduled). The number of items and queues is inferred from the dimensions of serviceRates.
      Parameters:
      accessProb - access probabilities for each item
      serviceRates - per-queue per-item retrieval service rates [nQueues x nItems]
      routingMatrices - per-item routing matrices, one per item [(nQueues+1) x (nQueues+1)]
      itemLevelCap - MATLAB-style string defining per-level cache capacity (e.g. "[2]", "[1,2]")
      sched - scheduling strategy for the non-IS retrieval queues
      Returns:
      Network of the probabilistic routing retrieval system model
    • retrieval_system_with_probabilistic_routing

      public static Network retrieval_system_with_probabilistic_routing(double[] accessProb, Matrix serviceRates, String itemLevelCap, SchedStrategy sched)
      Overload using the default 3-item routing matrices defined for the probabilistic routing model.
    • retrieval_system_with_probabilistic_routing_and_self_loops

      public static Network retrieval_system_with_probabilistic_routing_and_self_loops(double[] accessProb, Matrix serviceRates, Matrix[] routingMatrices, String itemLevelCap, SchedStrategy sched)
      Cache model with probabilistic per-item routing including self-loops through a retrieval system of 3 queues (one infinite-server, two scheduled). The number of items and queues is inferred from the dimensions of serviceRates.
      Parameters:
      accessProb - access probabilities for each item
      serviceRates - per-queue per-item retrieval service rates [nQueues x nItems]
      routingMatrices - per-item routing matrices, one per item [(nQueues+1) x (nQueues+1)]
      itemLevelCap - MATLAB-style string defining per-level cache capacity (e.g. "[2]", "[1,2]")
      sched - scheduling strategy for the non-IS retrieval queues
      Returns:
      Network of the probabilistic routing with self-loops retrieval system model
    • retrieval_system_with_probabilistic_routing_and_self_loops

      public static Network retrieval_system_with_probabilistic_routing_and_self_loops(double[] accessProb, Matrix serviceRates, String itemLevelCap, SchedStrategy sched)
      Overload using the default 3-item routing matrices (with self-loops) defined for the probabilistic routing model.