Package jline.lang.nodes
Class Cache
java.lang.Object
jline.lang.Element
jline.lang.NetworkElement
jline.lang.nodes.Node
jline.lang.nodes.StatefulNode
jline.lang.nodes.Cache
- All Implemented Interfaces:
Serializable
A class switch node based on cache hits or misses
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class jline.lang.nodes.Node
dropStrategy, input, model, nodeIndex, output, server, statefulIdx, stationIdx
Fields inherited from class jline.lang.NetworkElement
name
-
Constructor Summary
ConstructorDescriptionCache
(Network model, String name, int nitems, int itemLevelCap, ReplacementStrategy replPolicy) Cache
(Network model, String name, int nitems, int itemLevelCap, ReplacementStrategy replPolicy, Matrix[] graph) Cache
(Network model, String name, int nitems, Matrix itemLevelCap, ReplacementStrategy replPolicy) Cache
(Network model, String name, int nitems, Matrix itemLevelCap, ReplacementStrategy replPolicy, Matrix[] graph) -
Method Summary
Modifier and TypeMethodDescriptiongetAccessProb
(int i, int j) Matrix[]
getGraph()
For an incoming job of class r, HITCLASS[r] is the new class of that job after a hitgetItems()
For an incoming job of class r, MISSCLASS[r] is the new class of that job after a missint
int
popularityGet
(int i) popularityGet
(int i, int j) int
void
popularitySet
(int i, int j, Distribution o) void
popularitySet
(int i, Distribution o) void
reset()
Reset the internal data structures when the network model is resetvoid
setAccessProb
(Matrix[][] R) void
setHitClass
(JobClass jobinclass, JobClass joboutclass) void
setMissClass
(JobClass jobinclass, JobClass joboutclass) void
setProbRouting
(JobClass jobClass, Node destination, double probability) void
setRead
(JobClass jobClass, Distribution distribution) Set the read policy for a job classvoid
setReadItemEntry
(JobClass jobClass, Distribution popularity, int cardinality) void
setResultHitProb
(Matrix actualHitProb) void
setResultMissProb
(Matrix actualMissProb) void
setScheduling
(int jobClass, SchedStrategy strategy) Methods inherited from class jline.lang.nodes.StatefulNode
clearState, getNumberOfServers, getState, getStatefulIndex, getStatePrior, setState, setStatePrior
Methods inherited from class jline.lang.nodes.Node
getAttribute, getCap, getClassCap, getDropStrategy, getInput, getModel, getNodeIdx, getOutput, getOutputStrategies, getRoutingStrategy, getServer, getStatefulIdx, getStationIdx, isReferenceStation, isStateful, printSummary, resetRouting, setModel, setNodeIdx, setRouting, setRouting, setStationIdx
Methods inherited from class jline.lang.NetworkElement
getName
-
Field Details
-
accessProb
-
schedPolicy
-
schedStrategy
-
-
Constructor Details
-
Cache
public Cache(Network model, String name, int nitems, int itemLevelCap, ReplacementStrategy replPolicy) -
Cache
public Cache(Network model, String name, int nitems, int itemLevelCap, ReplacementStrategy replPolicy, Matrix[] graph) -
Cache
public Cache(Network model, String name, int nitems, Matrix itemLevelCap, ReplacementStrategy replPolicy) -
Cache
public Cache(Network model, String name, int nitems, Matrix itemLevelCap, ReplacementStrategy replPolicy, Matrix[] graph)
-
-
Method Details
-
reset
public void reset()Reset the internal data structures when the network model is reset -
setScheduling
-
setResultHitProb
-
setResultMissProb
-
getHitRatio
-
getMissRatio
-
setHitClass
-
setMissClass
-
setRead
Set the read policy for a job class- Parameters:
jobClass
- - the job classdistribution
- - the popularity distribution
-
setReadItemEntry
-
setAccessProb
-
getAccessProb
-
setProbRouting
- Overrides:
setProbRouting
in classNode
-
getSections
- Overrides:
getSections
in classNode
-
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
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
-
getGraph
-
getnLevels
public int getnLevels() -
getCacheServer
-
getItemLevelCap
-
getReplacementPolicy
-
getNumberOfItems
public int getNumberOfItems() -
popularitySet
-
popularitySet
-
popularityGet
-
popularityGet
-
popularityLength
public int popularityLength()
-