Class Cache

All Implemented Interfaces:
Serializable

public class Cache extends StatefulNode implements Serializable
A class switch node based on cache hits or misses
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • reset

      public void reset()
      Reset the internal data structures when the network model is reset
      Overrides:
      reset in class Node
    • setScheduling

      public void setScheduling(int jobClass, SchedStrategy strategy)
    • setResultHitProb

      public void setResultHitProb(Matrix actualHitProb)
    • setResultMissProb

      public void setResultMissProb(Matrix actualMissProb)
    • getHitRatio

      public Matrix getHitRatio()
    • getMissRatio

      public Matrix getMissRatio()
    • setHitClass

      public void setHitClass(JobClass jobinclass, JobClass joboutclass)
    • setMissClass

      public void setMissClass(JobClass jobinclass, JobClass joboutclass)
    • setRead

      public void setRead(JobClass jobClass, Distribution distribution)
      Set the read policy for a job class
      Parameters:
      jobClass - - the job class
      distribution - - the popularity distribution
    • setReadItemEntry

      public void setReadItemEntry(JobClass jobClass, Distribution popularity, int cardinality)
    • setAccessProb

      public void setAccessProb(Matrix[][] R)
    • getAccessProb

      public Matrix getAccessProb(int i, int j)
    • setProbRouting

      public void setProbRouting(JobClass jobClass, Node destination, double probability)
      Overrides:
      setProbRouting in class Node
    • getSections

      public List<Section> getSections()
      Overrides:
      getSections in class Node
    • getHitClass

      public Matrix getHitClass()
      For an incoming job of class r, HITCLASS[r] is the new class of that job after a hit
      Returns:
      - the matrix of hit classes
    • getMissClass

      public Matrix getMissClass()
      For an incoming job of class r, MISSCLASS[r] is the new class of that job after a miss
      Returns:
      - the matrix of miss classes
    • getItems

      public ItemSet getItems()
    • getGraph

      public Matrix[] getGraph()
    • getnLevels

      public int getnLevels()
    • getCacheServer

      public CacheClassSwitcher getCacheServer()
    • getItemLevelCap

      public Matrix getItemLevelCap()
    • getReplacementPolicy

      public ReplacementStrategy getReplacementPolicy()
    • getNumberOfItems

      public int getNumberOfItems()
    • popularitySet

      public void popularitySet(int i, Distribution o)
    • popularitySet

      public void popularitySet(int i, int j, Distribution o)
    • popularityGet

      public Distribution popularityGet(int i)
    • popularityGet

      public Distribution popularityGet(int i, int j)
    • popularityLength

      public int popularityLength()