private class LookupLocatorDiscovery.DiscoveryTask extends RetryTask
com.sun.jini.thread.RetryTask.retryTime
.RetryTask
,
WakeupManager
Modifier and Type | Field and Description |
---|---|
private LookupLocatorDiscovery.LocatorReg |
reg |
DAYS, HOURS, MINUTES, SECONDS
Constructor and Description |
---|
LookupLocatorDiscovery.DiscoveryTask(LookupLocatorDiscovery.LocatorReg reg,
TaskManager taskMgr,
WakeupManager wakeupMgr) |
Modifier and Type | Method and Description |
---|---|
long |
retryTime()
Returns the next absolute time (in milliseconds) at which another
attempt to discover the lookup service referenced in this class
should be made.
|
boolean |
runAfter(List tasks,
int size)
Returns true if current instance must be run after task(s) in
task manager queue.
|
boolean |
tryOnce()
Executes the current instance of this task once, attempting to
discover - through unicast discovery - the lookup service
referenced in that instance.
|
private LookupLocatorDiscovery.LocatorReg reg
public LookupLocatorDiscovery.DiscoveryTask(LookupLocatorDiscovery.LocatorReg reg, TaskManager taskMgr, WakeupManager wakeupMgr)
public boolean tryOnce()
true
and the current instance of this task is not executed again.
For each unsuccessful discovery attempt made by this method
for the current instance of this task, this method returns
false
, which causes the task to be scheduled by
the WakeupManager
to be executed again at a later
time as indicated by the value returned by retryTime
.public long retryTime()
public boolean runAfter(List tasks, int size)
tasks
- the tasks to consider.size
- elements with index less than size are considered.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.