Ejemplo n.º 1
0
 // If time goes by and nobody sends information about the video,
 // the ttl will be incremented for all the channels.
 void IncrementAllChannelsTTL() {
   Enumeration keys = videoTable.keys();
   while (keys.hasMoreElements()) {
     Integer auxkey = (Integer) keys.nextElement();
     videoEntry_t auxEntry = (videoEntry_t) videoTable.get(auxkey);
     if ((auxEntry.getvideoTTL()) < 10) {
       auxEntry.incrementTTL();
       videoTable.put(auxkey, auxEntry);
     } else {
       deleteChannel(auxkey);
     }
   }
 }