public class

FutureImpl

extends Object
implements Future
java.lang.Object
   ↳ com.ericsson.research.trap.utils.FutureImpl

Summary

Public Constructors
FutureImpl(ScheduledFuture<?> scheduledFuture)
Public Methods
boolean cancel()
Cancel the future task.
boolean cancel(boolean mayInterruptIfRunning)
Cancel the future task.
boolean isCancelled()
Checks if the task has been cancelled.
boolean isDone()
Checks if the task has executed.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.ericsson.research.trap.utils.Future

Public Constructors

public FutureImpl (ScheduledFuture<?> scheduledFuture)

Public Methods

public boolean cancel ()

Cancel the future task.

Returns
  • false if the task could not be cancelled, typically because it has already completed normally; true otherwise

public boolean cancel (boolean mayInterruptIfRunning)

Cancel the future task.

Parameters
mayInterruptIfRunning true if the thread executing this task should be interrupted; otherwise, in-progress tasks are allowed to complete
Returns
  • false if the task could not be cancelled, typically because it has already completed normally; true otherwise

public boolean isCancelled ()

Checks if the task has been cancelled.

Returns
  • true if cancel was called before the task executed, false otherwise.

public boolean isDone ()

Checks if the task has executed.

Returns
  • true if the task has executed, false otherwise.