InMemoryContextRepository

class InMemoryContextRepository(properties: ContextRepositoryProperties = ContextRepositoryProperties()) : ContextRepository

In-memory implementation of ContextRepository with configurable window size to prevent memory overflow by evicting the oldest entries when the limit is reached.

Constructors

Link copied to clipboard
constructor(properties: ContextRepositoryProperties = ContextRepositoryProperties())

Functions

Link copied to clipboard
fun clear(): <Error class: unknown class>

Clear all entries from the repository for testing purposes.

Link copied to clipboard
open override fun create(): Context

Create an empty context.

Link copied to clipboard
open override fun delete(context: Context)
Link copied to clipboard
open override fun findById(id: String): Context?
Link copied to clipboard
open override fun save(context: Context): Context
Link copied to clipboard
fun size(): Int

Get current size of the repository for testing purposes.