failure
fun <T> failure(error: Throwable, errorUpdatedAt: Long = epoch(), subscriberStatus: SubscriberStatus = SubscriberStatus.NoSubscribers): SubscriptionState<T>
Creates a new SubscriptionState with the SubscriptionStatus.Failure status.
Parameters
error
The error to be stored in the state.
errorUpdatedAt
The timestamp when the error was updated. Default is the current epoch.
subscriberStatus
The status of the subscriber.
fun <T> failure(error: Throwable, errorUpdatedAt: Long = epoch(), data: T, dataUpdatedAt: Long = epoch(), subscriberStatus: SubscriberStatus = SubscriberStatus.NoSubscribers): SubscriptionState<T>
Creates a new SubscriptionState with the SubscriptionStatus.Failure status.
Parameters
error
The error to be stored in the state.
errorUpdatedAt
The timestamp when the error was updated. Default is the current epoch.
data
The data to be stored in the state.
dataUpdatedAt
The timestamp when the data was updated. Default is the current epoch.
subscriberStatus
The status of the subscriber.