BulkheadRegistry
class BulkheadRegistry
Registry of named DefaultBulkhead instances so multiple com.santimattius.resilient.ResilientPolicy configurations can share the same bulkhead limits (e.g. one pool per downstream "payments", "db").
Thread-safety: getOrCreate is not synchronized across platforms. Typical use is to build policies on a single thread at startup; do not call getOrCreate concurrently for the same registry without external synchronization.
The first successful getOrCreate for a given name wins; subsequent calls return the same instance and ignore configuration differences (document your convention: one name, one config).
Functions
Link copied to clipboard
fun getOrCreate(name: String, configure: BulkheadConfig.() -> Unit, onRejected: (reason: String) -> Unit? = null): DefaultBulkhead
Returns an existing DefaultBulkhead for name, or creates one with configure.