public void notifyOfTaskAssignment ( long taskId , long nextExecTime , short binaryFlags , int transactionTimeout ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; Boolean previous = inMemoryTaskIds . put ( taskId , Boolean . TRUE ) ; if ( previous == null ) { InvokerTask task = new InvokerTask ( this , taskId , nextExecTime , binaryFlags , transactionTimeout ) ; long delay = nextExecTime - new Date ( ) . getTime ( ) ; if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( PersistentExecutorImpl . this , tc , "Found task " + taskId + " for " + delay + "ms from now" ) ; scheduledExecutor . schedule ( task , delay , TimeUnit . MILLISECONDS ) ; } else { if ( trace && tc . isDebugEnabled ( ) ) Tr . debug ( PersistentExecutorImpl . this , tc , "Found task " + taskId + " already scheduled" ) ; } }
Invoked by a controller to notify a persistent executor that a task has been assigned to it .