Class Cache
java.lang.Object
QueueNet.NodeSection
NodeSections.PipeSection
NodeSections.ServiceSection
NodeSections.Cache
This class implements a class switch.
- Author:
- Sebatiano Spicuglia, Arif Canakoglu
-
Field Summary
Fields inherited from class NodeSection
EXCEPTION_MEASURE_DOES_NOT_EXIST, EXCEPTION_PROPERTY_NOT_AVAILABLE, INPUT, jobsList, logger, MSG_NOT_PROCESSED, MSG_PROCESSED, NO_ADDRESS, OUTPUT, PROPERTY_ID_ARRIVING_JOBS, PROPERTY_ID_AVERAGE_UTILIZATION, PROPERTY_ID_DEPARTING_JOBS, PROPERTY_ID_RESIDENCE_TIME, PROPERTY_ID_RESIDENT_JOBS, PROPERTY_ID_UTILIZATION, SERVICE -
Constructor Summary
ConstructorsConstructorDescriptionCache(Integer maxItems, Integer[] cacheCapacity, Object[] matrix, JobClass[] jobClasses, JobClass[] hitClasses, JobClass[] missClasses, CacheStrategy replacePolicy, DiscreteDistribution[] pop) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddJobClassMapping(JobClass jobClass, JobClass hitClass, JobClass missClass) getHitClass(JobClass jobClass) getMissClass(JobClass jobClass) voidnodeLinked(NetNode ownerNode) when the node section itself is linked to the owner node.protected intprocess(NetMessage message) Processes the given message received by this node section.Methods inherited from class ServiceSection
sendBackward, sendBackward, sendForward, sendForwardMethods inherited from class NodeSection
analyze, analyze, analyzeFCR, analyzeFJ, analyzeJoin, analyzeTransition, getClassCompatibilities, getDoubleSectionProperty, getDoubleSectionProperty, getIntSectionProperty, getIntSectionProperty, getJobClasses, getJobInfoList, getObject, getObject, getOwnerNode, getParameter, getParameter, getSectionID, getServerTypes, isEnabled, isEnabled, isMine, isMyOwnerNode, redirect, removeMessage, send, send, send, send, send, send, sendAckAfterDrop, sendMe, sendMe, updateVisitPath
-
Constructor Details
-
Cache
public Cache(Integer maxItems, Integer[] cacheCapacity, Object[] matrix, JobClass[] jobClasses, JobClass[] hitClasses, JobClass[] missClasses, CacheStrategy replacePolicy, DiscreteDistribution[] pop)
-
-
Method Details
-
addJobClassMapping
-
getHitClass
-
getMissClass
-
nodeLinked
when the node section itself is linked to the owner node. This method should be used to set node section properties depending on the owner node ones.- Overrides:
nodeLinkedin classNodeSection- Parameters:
ownerNode-- Throws:
NetException
-
process
Processes the given message received by this node section. This method should be used to reset node section properties depending on the owner node ones when the node section itself is unlinked to the owner node.- Specified by:
processin classNodeSection- Parameters:
message- the message to process- Returns:
- the resulting int
- Throws:
NetException- if the message cannot be processed modified by Yujiao Xiao
-