net.jini.lookup
Class ServiceDiscoveryManager.LookupCacheImpl.LookupTask

java.lang.Object
  extended by net.jini.lookup.ServiceDiscoveryManager.CacheTask
      extended by net.jini.lookup.ServiceDiscoveryManager.LookupCacheImpl.LookupTask
All Implemented Interfaces:
TaskManager.Task, Runnable
Enclosing class:
ServiceDiscoveryManager.LookupCacheImpl

private final class ServiceDiscoveryManager.LookupCacheImpl.LookupTask
extends ServiceDiscoveryManager.CacheTask

This class requests a "snapshot" of the given registrar's state.


Field Summary
private  ServiceDiscoveryManager.EventReg eReg
           
 
Fields inherited from class net.jini.lookup.ServiceDiscoveryManager.CacheTask
reg, thisTaskSeqN
 
Constructor Summary
ServiceDiscoveryManager.LookupCacheImpl.LookupTask(ServiceDiscoveryManager.ProxyReg reg, long seqN, ServiceDiscoveryManager.EventReg eReg)
           
 
Method Summary
 void run()
           
 boolean runAfter(List tasks, int size)
          Returns true if the current instance of this task must be run after at least one task in the task manager queue.
 
Methods inherited from class net.jini.lookup.ServiceDiscoveryManager.CacheTask
getProxyReg, getSeqN, isFromProxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eReg

private ServiceDiscoveryManager.EventReg eReg
Constructor Detail

ServiceDiscoveryManager.LookupCacheImpl.LookupTask

public ServiceDiscoveryManager.LookupCacheImpl.LookupTask(ServiceDiscoveryManager.ProxyReg reg,
                                                          long seqN,
                                                          ServiceDiscoveryManager.EventReg eReg)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Specified by:
run in class ServiceDiscoveryManager.CacheTask

runAfter

public boolean runAfter(List tasks,
                        int size)
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, other LookupTasks, or NotifyEventTasks associated with this task's lookup service (ProxyReg), if those tasks were queued prior to this task (have lower sequence numbers), then run those tasks before this task (return true). Otherwise this task can be run immediately (return false). This method was added to address Bug ID 6291851.

Specified by:
runAfter in interface TaskManager.Task
Overrides:
runAfter in class ServiceDiscoveryManager.CacheTask
Parameters:
tasks - the tasks to consider.
size - elements with index less than size are considered.


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.