net.jini.lookup
Class ServiceDiscoveryManager.LookupCacheImpl.NotifyEventTask
java.lang.Object
net.jini.lookup.ServiceDiscoveryManager.CacheTask
net.jini.lookup.ServiceDiscoveryManager.ServiceIdTask
net.jini.lookup.ServiceDiscoveryManager.LookupCacheImpl.NotifyEventTask
- All Implemented Interfaces:
- TaskManager.Task, Runnable
- Enclosing class:
- ServiceDiscoveryManager.LookupCacheImpl
private final class ServiceDiscoveryManager.LookupCacheImpl.NotifyEventTask
- extends ServiceDiscoveryManager.ServiceIdTask
Task class used to asynchronously notify all registered service
discovery listeners of serviceAdded/serviceRemoved/serviceChanged
events.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sid
private ServiceID sid
item
private ServiceItem item
transition
private int transition
ServiceDiscoveryManager.LookupCacheImpl.NotifyEventTask
public ServiceDiscoveryManager.LookupCacheImpl.NotifyEventTask(ServiceDiscoveryManager.ProxyReg reg,
ServiceID sid,
ServiceItem item,
int transition,
long seqN)
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
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.
- Specified by:
runAfter
in interface TaskManager.Task
- Overrides:
runAfter
in class ServiceDiscoveryManager.ServiceIdTask
- 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.