lucee.Componentcoldbox.system.async.tasks.FutureTask
This is a ColdBox Future Task object modeled and backed by Java's Future interface but with Dynamic Goodness! This is the return of most of the executors when you send runnables to execute
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
native
The native future we model: java.
|
true
|
false
|
Constructor Summary | |
---|---|
init([any native])
Build the ColdBox Future with the Java native class. |
Method Summary | |
---|---|
boolean
|
cancel([boolean mayInterruptIfRunning='true'])
If not already completed, completes this Future with a CancellationException. |
any
|
get([numeric timeout='0'], [string timeUnit='milliseconds'], [any defaultValue])
Waits if necessary for at most the given time for this future to complete, and then returns its result, if available. |
string
|
getNative()
|
boolean
|
isCancelled()
Returns true if this Future was cancelled before it completed normally. |
boolean
|
isDone()
Returns true if completed in any fashion: normally, exceptionally, or via cancellation. |
any
|
setNative(any native)
|
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Build the ColdBox Future with the Java native class
native
- The native Future class we are wrappingProperty Detail |
---|
The native future we model: java.util.concurrent.Future
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
If not already completed, completes this Future with a CancellationException. Dependent Futures that have not already completed will also complete exceptionally, with a CompletionException caused by this CancellationException.
mayInterruptIfRunning
Waits if necessary for at most the given time for this future to complete, and then returns its result, if available. If the result is null, then you can pass the defaultValue argument to return it.
timeout
- The timeout value to use, defaults to forevertimeUnit
- The time unit to use, available units are: days, hours, microseconds, milliseconds, minutes, nanoseconds, and seconds. The default is millisecondsdefaultValue
- If the Future did not produce a value, then it will return this default value.Returns true if this Future was cancelled before it completed normally.
Returns true if completed in any fashion: normally, exceptionally, or via cancellation.
native