AbstractPromise

cc.otavia.core.stack.AbstractPromise
abstract class AbstractPromise[V] extends Future[V], Poolable

An abstract class for Promise

Attributes

Graph
Supertypes
trait Poolable
trait Future[V]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

final override def actorStack: Stack

Attributes

Definition Classes
Promise
final override def canTimeout: Boolean

Whether this promise is set to be time-out

Whether this promise is set to be time-out

Attributes

Returns

true if it has be set.

Definition Classes
Promise
override def cause: Option[Throwable]

Returns the cause of the failed operation if the operation has failed.

Returns the cause of the failed operation if the operation has failed.

Attributes

Returns

The cause of the failure, if any. Otherwise None if succeeded.

Throws
IllegalStateException

if this Promise has not completed yet.

Definition Classes
override def causeUnsafe: Throwable

Returns the cause of the failed operation if the operation has failed.

Returns the cause of the failed operation if the operation has failed.

Attributes

Returns

The cause of the failure, if any.

Throws
IllegalStateException

if this Promise has not completed yet, or if it has been succeeded.

Definition Classes
override protected def cleanInstance(): Unit

Clean the field of this instance.

Clean the field of this instance.

Attributes

Definition Classes
override def getNow: V

Return the successful result of this asynchronous operation, if any. If the operation has not yet been completed, then this will throw IllegalStateException . If the operation has been failed with an exception, then this throw cause .

Return the successful result of this asynchronous operation, if any. If the operation has not yet been completed, then this will throw IllegalStateException . If the operation has been failed with an exception, then this throw cause .

Attributes

Returns

the result of this operation, if completed successfully.

Throws
IllegalStateException

if this Future or Promise has not completed yet.

Throwable

if the operation has been failed with an exception.

Definition Classes
final def id: Long
override def isFailed: Boolean

Returns true if and only if the operation was completed and failed.

Returns true if and only if the operation was completed and failed.

Attributes

Definition Classes
override def isSuccess: Boolean

Returns true if and only if the operation was completed successfully.

Returns true if and only if the operation was completed successfully.

Attributes

Definition Classes
final def setId(id: Long): Unit
final override def setStack(s: Stack): Unit

Attributes

Definition Classes
Promise
def setTimeoutId(id: Long): Unit
def timeoutId: Long

Inherited methods

final def clean(): Unit

Clean all fields of this instance.

Clean all fields of this instance.

Attributes

Inherited from:
Poolable
def cleanNext(): Unit

Attributes

Inherited from:
Nextable (hidden)
def deChain(): Unit

Attributes

Inherited from:
Nextable (hidden)
def future: Future[V]

Return the Future instance is associated with this promise. This future will be completed upon completion of this promise.

Return the Future instance is associated with this promise. This future will be completed upon completion of this promise.

Attributes

Returns

A future instance associated with this promise.

Inherited from:
Promise (hidden)
def isDone: Boolean

Return true if this operation has been completed either Promise.setSuccess successfully, Promise.setFailure unsuccessfully.

Return true if this operation has been completed either Promise.setSuccess successfully, Promise.setFailure unsuccessfully.

Attributes

Returns

true if this operation has completed, otherwise false.

Inherited from:
Future
def isTail: Boolean

Attributes

Inherited from:
Nextable (hidden)
final def isTimeout: Boolean

Returns true if and only if the operation was completed and failed with TimeoutException.

Returns true if and only if the operation was completed and failed with TimeoutException.

Attributes

Inherited from:
Future
def next: Nextable | Null

Attributes

Inherited from:
Nextable (hidden)
def next_=(next: Nextable): Unit

Set the next object of this object.

Set the next object of this object.

Attributes

Inherited from:
Nextable (hidden)
def notInChain: Boolean

true if and only if this object is not in any chain

true if and only if this object is not in any chain

Attributes

Inherited from:
Nextable (hidden)
def recycle(): Unit

Recycle this instance.

Recycle this instance.

Attributes

Inherited from:
Poolable
def setFailure(cause: Throwable): Unit

Marks this promise as a failure.

Marks this promise as a failure.

If it is success or failed already it will throw an IllegalStateException.

Attributes

Inherited from:
Promise (hidden)
def setSuccess(result: AnyRef): Unit

Marks this promise as a success.

Marks this promise as a success.

If it is success or failed already it will throw an IllegalStateException.

Attributes

Inherited from:
Promise (hidden)

Concrete fields

protected var aid: Long
protected var error: Throwable
protected var result: AnyRef
protected var stack: Stack