SetStateCacheRefresher

open class SetStateCacheRefresher<K, S : Any, D>(namedAggregate: NamedAggregate, stateToCacheDataConverter: StateToCacheDataConverter<ReadOnlyStateAggregate<S>, D>, val ttl: Long = CoCache.DEFAULT_TTL, val ttlAmplitude: Long = CoCache.DEFAULT_TTL_AMPLITUDE, val cache: Cache<K, D>, val keyConvert: (StateDomainEventExchange<S, Any>) -> K = { exchange -> @Suppress("UNCHECKED_CAST") exchange.message.aggregateId.id as K }) : TtlConfiguration, StateCacheRefresher<S, D, StateDomainEventExchange<S, Any>>

Updates the cache from the latest aggregate state.

Constructors

Link copied to clipboard
constructor(namedAggregate: NamedAggregate, stateToCacheDataConverter: StateToCacheDataConverter<ReadOnlyStateAggregate<S>, D>, ttl: Long = CoCache.DEFAULT_TTL, ttlAmplitude: Long = CoCache.DEFAULT_TTL_AMPLITUDE, cache: Cache<K, D>, keyConvert: (StateDomainEventExchange<S, Any>) -> K = { exchange -> @Suppress("UNCHECKED_CAST") exchange.message.aggregateId.id as K })

Properties

Link copied to clipboard
val cache: Cache<K, D>
Link copied to clipboard
open override val functionKind: FunctionKind
Link copied to clipboard
Link copied to clipboard
open override val ttl: Long
Link copied to clipboard
open override val ttlAmplitude: Long

Functions

Link copied to clipboard
open fun evict(exchange: StateDomainEventExchange<S, Any>)
Link copied to clipboard
open override fun refresh(exchange: StateDomainEventExchange<S, Any>)