SimpleWaitStrategyRegistrar

Simple thread-safe implementation of WaitStrategyRegistrar using ConcurrentHashMap. Provides concurrent access to wait strategies with atomic operations.

Functions

Link copied to clipboard
open operator override fun contains(waitCommandId: String): Boolean

Checks if a wait strategy is registered for the given command ID.

Link copied to clipboard
open override fun get(waitCommandId: String): WaitStrategy?

Retrieves a wait strategy by its command ID.

Link copied to clipboard
open fun next(signal: WaitSignal): Boolean

Forwards a wait signal to the appropriate wait strategy. Retrieves the strategy by signal's wait command ID and calls next() on it.

Link copied to clipboard
open override fun register(waitStrategy: WaitStrategy): WaitStrategy?

Registers a wait strategy if not already present. Similar to Map.putIfAbsent - returns existing strategy if one exists for the same ID.

Link copied to clipboard
open override fun unregister(waitCommandId: String): WaitStrategy?

Unregisters a wait strategy by its command ID. Similar to Map.remove - removes and returns the strategy if it exists.