CachingGateway

class CachingGateway(cache: DataCache, gateway: Gateway, dispatcher: CoroutineDispatcher = Dispatchers.Default) : DataCache, Gateway, CoroutineScope(source)

A bridge between DataCache and Gateway that automatically empties cache on disconnect.

Constructors

Link copied to clipboard
constructor(cache: DataCache, gateway: Gateway, dispatcher: CoroutineDispatcher = Dispatchers.Default)

Properties

Link copied to clipboard
Link copied to clipboard
open override val events: SharedFlow<Event>
Link copied to clipboard
open override val ping: StateFlow<Duration?>

Functions

Link copied to clipboard
fun DataCache.createView(): DataCacheView

Creates a DataCacheView for this view, only removing elements that were added directly to this instance.

Link copied to clipboard
open suspend override fun detach()
Link copied to clipboard
open override fun <T : Any> getEntry(type: KType): DataEntryCache<T>?
Link copied to clipboard
open suspend override fun register(description: DataDescription<out Any, out Any>)
open suspend override fun register(vararg descriptions: DataDescription<out Any, out Any>)
open suspend override fun register(descriptions: Iterable<DataDescription<out Any, out Any>>)
Link copied to clipboard
open suspend override fun send(command: Command)
Link copied to clipboard
open suspend override fun start(configuration: GatewayConfiguration)
Link copied to clipboard
open suspend override fun stop()
Link copied to clipboard
open override fun toString(): String