private class AbstractLookupLocatorDiscovery.DiscoveryTask extends RetryTask
org.apache.river.thread.RetryTask.retryTime
.RetryTask
,
WakeupManager
Modifier and Type | Field and Description |
---|---|
private AbstractLookupLocatorDiscovery.LocatorReg |
reg |
DAYS, HOURS, MINUTES, SECONDS
Constructor and Description |
---|
DiscoveryTask(AbstractLookupLocatorDiscovery.LocatorReg reg,
java.util.concurrent.ExecutorService executor,
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 |
tryOnce()
Executes the current instance of this task once, attempting to
discover - through unicast discovery - the lookup service
referenced in that instance.
|
private final AbstractLookupLocatorDiscovery.LocatorReg reg
public DiscoveryTask(AbstractLookupLocatorDiscovery.LocatorReg reg, java.util.concurrent.ExecutorService executor, 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
.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.