CheckpointingFileDataSupplier

class CheckpointingFileDataSupplier(fileName: String, checkpointName: String, split: String = " ", checkpointPredicate: CheckpointPredicate = defaultCheckpointPredicate) : RequestDataSupplier<List<String>> , FullDataAfterHook, AutoCloseable, OnErrorWithState

A checkpointing file data supplier works similarly to the FileDataSupplier in use under good conditions. When failing through, the checkpointing supplier will be able to capture those requests that did or didn't pass a predicate, and subsequently restart from a known state.

A caveat to this, is that depending on the side-effects of the server being called. It is possible that the request (or at least the data mutation effects) have completed from the server.

This means, that this should only be used in the event that the server requests are idempotent. Or retry is safe.

There is a startup cost to using this data supplier as well, as it has to take an exclusive copy of the request data.

Checkpoint data suppliers only create List request data. This ensures serialization isn't something we have to worry about.. Maybe another day.

A checkpointing supplier is also not expected to work

Constructors

Link copied to clipboard
constructor(fileName: String, checkpointName: String, split: String = " ", checkpointPredicate: CheckpointPredicate = defaultCheckpointPredicate)

Types

Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun <T> accept(channel: Channel<Envelope<Pair<HttpRequest, RequestData<T>>>>, envelope: Envelope<Pair<HttpRequest, RequestData<T>>>, e: Exception)
open override fun accept(req: HttpRequest, resp: HttpResponse, data: RequestData<*>)
Link copied to clipboard
open override fun close()
Link copied to clipboard
open suspend override fun getDataForRequest(): RequestData<List<String>>?
Link copied to clipboard
open fun init()
Link copied to clipboard
fun inject(callBuilder: CallBuilder<List<String>>)