I forgot to mention a key point. Remember that the high duty cycle is this
code:
synchronized void reset(String id) {
Entry entry = (Entry)idMap.remove(id);
timerMap.remove(entry.scheduledTime);
entry = new Entry(entry.offset,entry.id,entry.trg);
// move by on millisec, if there is a stored entry
while ( timerMap.containsKey(entry.scheduledTime) ) {
entry = new Entry(entry.offset+1,entry.id,entry.trg);
}
timerMap.put(entry.scheduledTime,entry);
idMap.put(entry.id,entry);
}
The general operation of this method slows down as you add additional
threads (thus additional entries in the mechanism). Further, all of the
other client threads have to wait (contend) for the synchronized block. It
means that during I/O handling, all protocol handlers have to take their
turn when resetting their watchdogs because of this implementation. The
more threads, the more contention.
--- Noel
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>