ConcurrentApplicationContextImpl

Constructors

Link copied to clipboard
constructor(name: String, permittedKeys: Set<Key<*>>? = null, initialCopy: ApplicationContext)
constructor(name: String, permittedKeys: Set<Key<*>>? = null)

Functions

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

Add value for given key.

open suspend override 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
open override fun <T> addIfNotPresent(key: Key<T>, value: T?)

Add value for given key if not already present.

open suspend override 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
open override fun <T> addWithOverwrite(key: Key<T>, value: T?): Any?

Add value for given key even if already present.

open suspend override 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
open override fun clear()

Clear the entire context

open suspend override 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
open override fun clone(cloneName: String, clonePermittedKeys: Set<Key<*>>?): ApplicationContext

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

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun <T> erase(key: Key<T>): T?

Erase value associated with key if any

open suspend override 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
open override fun <T> exists(key: Key<T>): Boolean

Check if any value or null associated with give key

open suspend override 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
open override fun <T> fetch(key: Key<T>): T?

Fetch value associated with key or null

open suspend override 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
open override fun getName(): String

Application context name

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

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

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isKeyValid(key: Key<*>): Boolean

Checks if key is valid for this context.

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

Get a set of keys in context

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

Merge other context with this using the given merge strategy

open suspend override 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