net.jini.lookup
Class ServiceDiscoveryManager.ServiceIdTask
java.lang.Object
net.jini.lookup.ServiceDiscoveryManager.CacheTask
net.jini.lookup.ServiceDiscoveryManager.ServiceIdTask
- All Implemented Interfaces:
- TaskManager.Task, Runnable
- Direct Known Subclasses:
- ServiceDiscoveryManager.LookupCacheImpl.NewOldServiceTask, ServiceDiscoveryManager.LookupCacheImpl.NotifyEventTask, ServiceDiscoveryManager.LookupCacheImpl.UnmapProxyTask
- Enclosing class:
- ServiceDiscoveryManager
private abstract static class ServiceDiscoveryManager.ServiceIdTask
- extends ServiceDiscoveryManager.CacheTask
Abstract base class for controlling the order-of-execution of tasks
corresponding to a particular serviceID associated with a particular
lookup service.
Method Summary |
ServiceID |
getServiceID()
Returns the ServiceID associated with this task. |
boolean |
runAfter(List tasks,
int size)
Returns true if the current instance of this task must be run
after at least one task in task manager queue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
thisTaskSid
protected ServiceID thisTaskSid
ServiceDiscoveryManager.ServiceIdTask
ServiceDiscoveryManager.ServiceIdTask(ServiceID srvcId,
ServiceDiscoveryManager.ProxyReg reg,
long seqN)
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 task manager queue.
The criteria for determining what value to return is as follows:
If there is at least one task in the given task list that is
associated with the same serviceID as this task, and that task
has a sequence number less than the sequence number of this task,
then run this task *after* the task in the list (return true);
otherwise run this task now (return false).
- 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.
getServiceID
public ServiceID getServiceID()
- Returns the ServiceID associated with this task.
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.