core / pragma.utils / InstancedConcurrentMap /
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.
Parameters #
instanceId | The instanceId of the service using this map. |
serviceInstanceCount | The total number of instances for the distributed service using this map. |
concurrentHashMap | The underlying map data structure for the ValidatingInstanceIdConcurrentHashMap. |
routingUtils | The helper class that does the key validation. |
Constructors #
fun <K : Any, V : Any> InstancedConcurrentMap(instanceId: UUID, routingUtils: RoutingUtils = RoutingUtils.defaultInstance, serviceInstanceCount: Int, concurrentHashMap: ConcurrentMap<K, V> = ConcurrentHashMap()) |
Properties #
Name | Summary |
---|---|
private val concurrentHashMap: ConcurrentMap<K, V> | |
private val instanceId: UUID | |
private val routingUtils: RoutingUtils | |
private val serviceInstanceCount: Int |