Package dev.restate.sdk
Interface DurablePromiseHandle<T>
-
public interface DurablePromiseHandle<T>This class represents a handle to anDurablePromisecreated in another handler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidreject(java.lang.String reason)Complete with failure theDurablePromise.voidresolve(T payload)Complete with success theDurablePromise.
-
-
-
Method Detail
-
resolve
void resolve(T payload) throws java.lang.IllegalStateException
Complete with success theDurablePromise.- Parameters:
payload- the result payload.- Throws:
java.lang.IllegalStateException- See Also:
DurablePromise
-
reject
void reject(java.lang.String reason) throws java.lang.IllegalStateExceptionComplete with failure theDurablePromise.- Parameters:
reason- the rejection reason. MUST NOT be null.- Throws:
java.lang.IllegalStateException- See Also:
DurablePromise
-
-