From: Patrícia B. F. <pat...@ya...> - 2010-03-26 14:14:31
|
I'm trying to implement another packet scheduler, but before I decided to do some tests. I made the following changes in class FIFOScheduler and ran the example: Network - example03. FIFOScheduler.java public synchronized Packet deque() { if (pktList.size() == 0) { return null; } // Packet p = (Packet) pktList.remove(0); // original Packet p = (Packet) pktList.remove(pktList.size()-1); // my test return p; } It functioned without problems. Then, I created a classe FIFOModifyScheduler with the same changes. FIFOModifyScheduler.java public synchronized Packet deque() { if (pktList.size() == 0) { return null; } // Packet p = (Packet) pktList.remove(0); // original Packet p = (Packet) pktList.remove(pktList.size()-1); // my test return p; }I ran, but it didn't function. How do I implement the modified algorithm? Regards, Patrícia ____________________________________________________________________________________ Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com |