question: @ Override public boolean runAfter ( List tasks , int size ) { for ( int i = 0 ; i < size ; i ++ ) { CacheTask t = ( CacheTask ) tasks . get ( i ) ; if ( t instanceof RegisterListenerTask || t instanceof LookupTask ) { ProxyReg otherReg = t . getProxyReg ( ) ; if ( reg . equals ( otherReg ) ) { if ( thisTaskSeqN > t . getSeqN ( ) ) return true ; } } } return super . runAfter ( tasks , size ) ; }
target:  Returns true if the current instance of this task must be run after at least one task in the task manager queue. The criteria for determining what value to return: If the task list contains any RegisterListenerTasks or LookupTasks associated with this task's lookup service (ProxyReg), and if those tasks were queued prior to this task (have lower sequence numbers), then run those tasks before this task (return true). Additionally, if the task list contains any other ServiceIdTasks associated with this task's service ID which were queued prior to this task, then run those tasks before this task. If the criteria outlined above is not satisfied, then this task can be run immediately (return false). This method was added to address Bug ID 6291851.