core / pragma.utils /

Package pragma.utils #

Types #

NameSummary

AlertingMutex

class AlertingMutex(locked: Boolean = false) : Mutex

AlertingMutex is an implementation of the Mutex interface that will log a warning if it cannot obtain a lock after 5000 ms.

InstancedConcurrentMap

class InstancedConcurrentMap<K : Any, V : Any>(val instanceId: UUID, val routingUtils: RoutingUtils = RoutingUtils.defaultInstance, val serviceInstanceCount: Int, val concurrentHashMap: ConcurrentMap<K, V> = ConcurrentHashMap()) : Iterable<Map.Entry<K, V>>

Map class that validates keys on "put" into the map. This is for the deterministic routing that drives the whole Pragma architecture.

JumpHash

class JumpHash

Algorithm from: https://arxiv.org/ftp/arxiv/papers/1406/1406.2294.pdf.

Functions #

NameSummary

receiveEncodedTextUsingIOContext

suspend fun ApplicationCall.receiveEncodedTextUsingIOContext(): String

Receive the request as a string.