InMemoryDataSource

InMemoryDataSource<T> is a key-value storage that implements GetDataSource, PutDataSource and DeleteDataSource storing values as live references during the instance life cycle.

Usage

val dataSource = InMemoryDataSource<Double>()
dataSource.put(IdQuery("pi"), 3.14159265359)
dataSource.get(IdQuery("pi"))
dataSource.delete(IdQuery("pi"))

Query Types

Only queries adopting the KeyQuery interface.

Object Types

Any object can be stored in a InMemoryDataSource.