public void enqueueWork ( AsyncUpdate unit ) throws ClosedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "enqueueWork" , unit ) ; synchronized ( this ) { if ( closed ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "enqueueWork" , "ClosedException" ) ; throw new ClosedException ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Enqueueing update: " + unit ) ; enqueuedUnits . add ( unit ) ; if ( executing ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "enqueueWork" , "AsyncUpdateThread executing" ) ; return ; } // not executing enqueued updates if ( enqueuedUnits . size ( ) > batchThreshold ) { executeSinceExpiry = true ; try { startExecutingUpdates ( ) ; } catch ( ClosedException e ) { // No FFDC code needed if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "enqueueWork" , e ) ; throw e ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "enqueueWork" ) ; }
Enqueue an AsyncUpdate