public class ConstantTimeout extends ExecutionTimeBasedTimeout
callbacks, initialised, startingTime
Constructor and Description |
---|
ConstantTimeout(int timeout)
Constructs a new constant timeout.
|
Modifier and Type | Method and Description |
---|---|
long |
getTimeout()
Returns the timeout in milliseconds.
|
protected void |
implementationInit()
For init methods of implementing classes.
|
boolean |
isReached()
Determines whether the timeout is reached.
|
void |
reportOneStepProgress()
Reports one step of progress to the policy.
|
init, registerCallback, unregisterCallback
public ConstantTimeout(int timeout)
timeout
- The timeout in milliseconds. Must not be negative.public boolean isReached()
Timeout
true
, it will return true
on all further ivocations.true
if the timeout is reached; false
otherwise.public long getTimeout()
public void reportOneStepProgress()
Timeout
protected void implementationInit()
ExecutionTimeBasedTimeout
ExecutionTimeBasedTimeout.init()
.implementationInit
in class ExecutionTimeBasedTimeout