ConcurrentApplicationContext

Functions

Link copied to clipboard
abstract fun <T> add(key: Key<T>, value: T?)

Add value for given key.

abstract suspend fun <T> add(key: Key<T>, value: T?, timeout: Long?)

Same as add in ApplicationContext with additional timeout parameter for wait time in case of multiple threads blocking on this method

Link copied to clipboard
abstract fun <T> addIfNotPresent(key: Key<T>, value: T?)

Add value for given key if not already present.

abstract suspend fun <T> addIfNotPresent(key: Key<T>, value: T?, timeout: Long?)

Same as addIfNotPresent in ApplicationContext with additional timeout parameter for wait time in case of multiple threads blocking on this method

Link copied to clipboard
abstract fun <T> addWithOverwrite(key: Key<T>, value: T?): Any?

Add value for given key even if already present.

abstract suspend fun <T> addWithOverwrite(key: Key<T>, value: T?, timeout: Long?): Any?

Same as addWithOverwrite in ApplicationContext with additional timeout parameter for wait time in case of multiple threads blocking on this method

Link copied to clipboard
abstract fun clear()

Clear the entire context

abstract suspend fun clear(timeout: Long?)

Same as clear in ApplicationContext with additional timeout parameter for wait time in case of multiple threads blocking on this method

Link copied to clipboard
abstract fun clone(cloneName: String, clonePermittedKeys: Set<Key<*>>? = null): ApplicationContext

Creates a clone of this context with passed cloneName and clonePermittedKeys. While cloning only the permittedKeys will be added

Link copied to clipboard
abstract fun <T> erase(key: Key<T>): T?

Erase value associated with key if any

abstract suspend fun <T> erase(key: Key<T>, timeout: Long?): T?

Same as erase in ApplicationContext with additional timeout parameter for wait time in case of multiple threads blocking on this method

Link copied to clipboard
abstract fun <T> exists(key: Key<T>): Boolean

Check if any value or null associated with give key

abstract suspend fun <T> exists(key: Key<T>, timeout: Long?): Boolean

Same as exists in ApplicationContext with additional timeout parameter for wait time in case of multiple threads blocking on this method

Link copied to clipboard
abstract fun <T> fetch(key: Key<T>): T?

Fetch value associated with key or null

abstract suspend fun <T> fetch(key: Key<T>, timeout: Long?): T?

Same as fetch in ApplicationContext with additional timeout parameter for wait time in case of multiple threads blocking on this method

Link copied to clipboard
abstract fun getName(): String

Application context name

Link copied to clipboard
abstract fun getPermittedKeys(): Set<Key<*>>?

Keys permitted for this context. Empty set means all keys permitted.

Link copied to clipboard
abstract fun isKeyValid(key: Key<*>): Boolean

Checks if key is valid for this context.

Link copied to clipboard
abstract fun keySet(): Set<Key<*>>?

Get a set of keys in context

Link copied to clipboard
abstract fun merge(other: ApplicationContext?, mergeStrategy: ApplicationContextMergeStrategy)

Merge other context with this using the given merge strategy

abstract suspend fun merge(other: ApplicationContext?, mergeStrategy: ApplicationContextMergeStrategy, timeout: Long?)

Same as merge in ApplicationContext with additional timeout parameter for wait time in case of multiple threads blocking on this method