ObservableMapIndex

An index to track which entries have been added to or removed from the cache.

Functions

Link copied to clipboard
abstract suspend fun getSubscriptionCount(key: K): StateFlow<Int>

Get the subscription count on an index entry, which uses an entry of the cache.

Link copied to clipboard
abstract suspend fun onPut(key: K)

Called, when an entry is added to the cache.

Link copied to clipboard
abstract suspend fun onRemove(key: K)

Called, when an entry is removed from the cache.

Link copied to clipboard
abstract suspend fun onRemoveAll()

Called, when all entries are removed from the cache.