public TimerWorkItem createTimeoutRequest ( long timeoutTime , TimerCallback _callback , IAbstractAsyncFuture _future ) { TimerWorkItem wi = new TimerWorkItem ( timeoutTime , _callback , _future , _future . getReuseCount ( ) ) ; _future . setTimeoutWorkItem ( wi ) ; // put this to the Timer's work queue. Use the queue that the Timer // thread is not using. if ( ( this . queueToUse == 1 ) || ( numQueues == 1 ) ) { synchronized ( this . requestQueue1 ) { // add the request to the Timer work queue this . requestQueue1 . add ( wi ) ; } } else { synchronized ( this . requestQueue2 ) { // add the request to the Timer work queue this . requestQueue2 . add ( wi ) ; } } return wi ; }
Creates a work item and puts it on the work queue for requesting a timeout to be started .