public class DslDeferredFunctionCall extends BrooklynDslDeferredSupplier<java.lang.Object>
ImmediateSupplier.ImmediateUnsupportedException, ImmediateSupplier.ImmediateValueNotAvailableException
Constructor and Description |
---|
DslDeferredFunctionCall(java.lang.Object o,
java.lang.String fn,
java.util.List<java.lang.Object> args) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Maybe<java.lang.Object> |
getImmediately()
Gets the value promptly, or returns
Maybe.absent() if the value requires blocking,
or throws ImmediateSupplier.ImmediateUnsupportedException if it cannot be determined whether the value requires blocking or not. |
int |
hashCode() |
Task<java.lang.Object> |
newTask() |
java.lang.String |
toString() |
get
public DslDeferredFunctionCall(java.lang.Object o, java.lang.String fn, java.util.List<java.lang.Object> args)
public Maybe<java.lang.Object> getImmediately()
ImmediateSupplier
Maybe.absent()
if the value requires blocking,
or throws ImmediateSupplier.ImmediateUnsupportedException
if it cannot be determined whether the value requires blocking or not.
The Maybe.absent()
returned here indicates that a value definitively is pending, just it is not yet available,
and an attempt to Maybe.get()
it should throw an ImmediateSupplier.ImmediateValueNotAvailableException
;
it can be created with ImmediateSupplier.ImmediateValueNotAvailableException.newAbsentWithExceptionSupplier()
to
avoid creating traces (or simply with Maybe.absent(new ImmediateValueNotAvailableException(...))
).
This is in contrast with this method throwing a ImmediateSupplier.ImmediateUnsupportedException
which should be done
if the presence of an eventual value cannot even be determined in a non-blocking way.
Implementations of this method should typically catch the former exception if encountered and return a
Maybe.absent()
wrapping it, whereas ImmediateSupplier.ImmediateUnsupportedException
instances should be propagated.
public Task<java.lang.Object> newTask()
newTask
in interface TaskFactory<Task<java.lang.Object>>
newTask
in class BrooklynDslDeferredSupplier<java.lang.Object>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object