def __init__(self, host, port, myRam, nodeName): self.diskCapacity = None self.contents = [] self.diskCapacity = DISK_CAPACITY self.diskAccess = 0 self.cacheAccess = 0 self.contents = InstructionParser.readServerContents(RESOURCE_DIR.replace('\\','/') + "/" + SERVER_CONTENT_FILE) Node.Node.__init__(self,host, port, myRam, nodeName, None)
def __init__(self, host, port, myRam, nodeName, instructionFile): Observable.__init__(self) self.myRam = myRam self.nodeName = nodeName self.diskAccessCount = 0 self.localCacheHitCount = 0 self.neighbourCacheHitCount = 0 self.diskAccessCount = 0 self.localCacheHitCount = 0 self.instructionSheet = [] if instructionFile: self.instructionSheet = InstructionParser.getInstructionFromFile(instructionFile)
def getInstructionSheet(self): return InstructionParser.getInstructionFromFile(r"C:\GITProjects\CapstonePy\resources\node1.txt")