WriteQueue

class WriteQueue<T>(capacity: Int = 64)(source)

Bounded, synchronous write policy. The connector supplies time, submissions and acknowledgments.

Constructors

Link copied to clipboard
constructor(capacity: Int = 64)

Types

Link copied to clipboard
class Submission<T>

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun discard(token: Long)
Link copied to clipboard
fun enqueue(bytes: ByteArray, attachment: T): WriteEnqueueResult
Link copied to clipboard
fun isCurrent(token: Long): Boolean
Link copied to clipboard

Returns each attempt once; accepted writes are never retried, even without an acknowledgment.

Link copied to clipboard
Link copied to clipboard
fun onSubmitted(token: Long, accepted: Boolean, retryable: Boolean, now: Long): Boolean

Returns true only for an exhausted/retry-forbidden rejection of the current attempt.

Link copied to clipboard
fun reset()