SetStateCacheRefresher

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

主动刷新缓存.

Constructors

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

Properties

Link copied to clipboard
open override val aggregateName: String
Link copied to clipboard
open override val amplitude: Long = 0

Jitter ttl (randomly) to prevent cache avalanche

Link copied to clipboard
val cache: Cache<K, D>
Link copied to clipboard
open override val contextName: String
Link copied to clipboard
open override val functionKind: FunctionKind
Link copied to clipboard
Link copied to clipboard
open override val name: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val processorName: String
Link copied to clipboard
open override val qualifiedName: String
Link copied to clipboard
Link copied to clipboard
open override val supportedType: Class<*>
Link copied to clipboard
open override val ttl: Long? = null

缓存过期时间,单位:秒

Functions

Link copied to clipboard
open fun evict(exchange: StateDomainEventExchange<S, Any>)
Link copied to clipboard
open override fun <A : Annotation> getAnnotation(annotationClass: Class<A>): A?
Link copied to clipboard
open fun handle(exchange: StateDomainEventExchange<S, Any>): Mono<Void>
Link copied to clipboard
open operator override fun invoke(exchange: StateDomainEventExchange<S, Any>): Mono<Void>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun isSameFunction(functionInfo: FunctionInfo): Boolean
Link copied to clipboard
open override fun refresh(exchange: StateDomainEventExchange<S, Any>)
Link copied to clipboard