class MemoryMessageCache : MessageCache
See Also
val keys: MutableSet<Long>
A MutableSet of all cached ids. |
|
val size: Int |
|
val values: MutableCollection<Message>
A MutableSet of all cached messages |
open val entries: MutableSet<MutableEntry<Long, Message>> |
fun clear(): Unit
Clears the cache |
|
fun contains(id: Long): Boolean
Checks whether an id is cached or not. |
|
fun get(key: Long): Message?
Gets a message from the cache. |
|
fun isEmpty(): Boolean
Checks whether there is at least one message cached. |
|
fun put(key: Long, value: Message): Message?
Adds a message to the cache. |
|
fun remove(key: Long): Message?
Removes a message by it's id from the cache. |
open fun cacheMessage(message: Message): Message?
Adds a message to the cache. |
|
open fun containsKey(key: Long): Boolean |
|
open fun containsValue(value: Message): Nothing |
|
open operator fun minusAssign(id: Long): Unit open operator fun minusAssign(message: Message): Unit |
|
open operator fun plusAssign(message: Message): Unit |
|
open fun putAll(from: Map<out Long, Message>): Nothing |
|
open fun remove(message: Message): Message?
Removes the message from the cache. |