public synchronized void put(THLEvent thlEvent) throws InterruptedException {
  if (cacheSize > 0) {
    while (cache.size() >= cacheSize) {
      THLEvent old=fifo.remove();
      cache.remove(old.getSeqno());
    }
    if (thlEvent.getFragno() == 0 && thlEvent.getLastFrag()) {
      fifo.put(thlEvent);
      cache.put(thlEvent.getSeqno(),thlEvent);
    }
  }
}

public synchronized void put ( THLEvent thlEvent ) throws InterruptedException { if ( cacheSize > 0 ) { while ( cache . size ( ) >= cacheSize ) { THLEvent old = fifo . remove ( ) ; cache . remove ( old . getSeqno ( ) ) ; } if ( thlEvent . getFragno ( ) == 0 && thlEvent . getLastFrag ( ) ) { fifo . put ( thlEvent ) ; cache . put ( thlEvent . getSeqno ( ) , thlEvent ) ; } } }
add an event to the cache , clearing space if necessary .
