protected static void addAlarm ( Object key , Object alarmObject ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addAlarm" , new Object [ ] { key , alarmObject } ) ; synchronized ( pendingAlarms ) { Set alarms = null ; if ( pendingAlarms . containsKey ( key ) ) alarms = ( Set ) pendingAlarms . get ( key ) ; else { alarms = new HashSet ( ) ; pendingAlarms . put ( key , alarms ) ; } alarms . add ( alarmObject ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addAlarm" ) ; }
Utility method for adding an alarm which needs to be expired if a flush occurs .