Top Description Inners Methods
io.github.resilience4j.core

public Interface Registry<E, C>

Known Direct Implementers
io.github.resilience4j.core.registry.AbstractRegistry
Imports
io.github.resilience4j.core.registry.EntryAddedEvent, .EntryRemovedEvent, .EntryReplacedEvent, .RegistryEvent, java.util.Map, .Optional

root resilience4j registry to be used by resilience types registries for common functionality

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
Registry.EventPublisher<E>

An EventPublisher can be used to register event consumers.

Method Summary

Modifier and TypeMethod and Description
public void
addConfiguration(String
the configuration name
configName
,
C
the added configuration
configuration
)

Adds a configuration to the registry

public Optional<E>
find(String
the name
name
)

Find a named entry in the Registry

public Optional<C>

Returns:

the found configuration if any
getConfiguration
(String
the configuration name
configName
)

Get a configuration by name

public C

Returns:

the default configuration
getDefaultConfig
()

Get the default configuration

public Registry.EventPublisher<E>

Returns:

an EventPublisher
getEventPublisher
()

Returns an EventPublisher which can be used to register event consumers.

public Map<String, String>

Returns:

global configured registry tags
getTags
()

public Optional<E>
remove(String
the name
name
)

Remove an entry from the Registry

public C
removeConfiguration(String configName)

+ * Removes a configuration from the registry + * + * @param configName the configuration name + * @return configuration mapped to the configName.

public Optional<E>
replace(String
the existing name
name
,
E
a new entry
newEntry
)

Replace an existing entry in the Registry by a new one.

Method Detail

addConfigurationback to summary
public void addConfiguration(String configName, C configuration)

Adds a configuration to the registry

Parameters
configName:String

the configuration name

configuration:C

the added configuration

findback to summary
public Optional<E> find(String name)

Find a named entry in the Registry

Parameters
name:String

the name

getConfigurationback to summary
public Optional<C> getConfiguration(String configName)

Get a configuration by name

Parameters
configName:String

the configuration name

Returns:Optional<C>

the found configuration if any

getDefaultConfigback to summary
public C getDefaultConfig()

Get the default configuration

Returns:C

the default configuration

getEventPublisherback to summary
public Registry.EventPublisher<E> getEventPublisher()

Returns an EventPublisher which can be used to register event consumers.

Returns:Registry.EventPublisher<E>

an EventPublisher

getTagsback to summary
public Map<String, String> getTags()
Returns:Map<String, String>

global configured registry tags

removeback to summary
public Optional<E> remove(String name)

Remove an entry from the Registry

Parameters
name:String

the name

removeConfigurationback to summary
public C removeConfiguration(String configName)

+ * Removes a configuration from the registry + * + * @param configName the configuration name + * @return configuration mapped to the configName. +

replaceback to summary
public Optional<E> replace(String name, E newEntry)

Replace an existing entry in the Registry by a new one.

Parameters
name:String

the existing name

newEntry:E

a new entry

io.github.resilience4j.core back to summary

public Interface Registry.EventPublisher<E>

extends EventPublisher<RegistryEvent>
Known Direct Implementers
io.github.resilience4j.core.registry.AbstractRegistry.RegistryEventProcessor

An EventPublisher can be used to register event consumers.

Method Summary

Modifier and TypeMethod and Description
public Registry.EventPublisher<E>
public Registry.EventPublisher<E>
public Registry.EventPublisher<E>
Inherited from io.github.resilience4j.core.EventPublisher:
onEvent

Method Detail

onEntryAddedback to summary
public Registry.EventPublisher<E> onEntryAdded(EventConsumer<EntryAddedEvent<E>> eventConsumer)
onEntryRemovedback to summary
public Registry.EventPublisher<E> onEntryRemoved(EventConsumer<EntryRemovedEvent<E>> eventConsumer)
onEntryReplacedback to summary
public Registry.EventPublisher<E> onEntryReplaced(EventConsumer<EntryReplacedEvent<E>> eventConsumer)