Class InMemoryTimerRegistry
- All Implemented Interfaces:
io.github.resilience4j.core.Registry<Timer,,TimerConfig> TimerRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.resilience4j.core.Registry
io.github.resilience4j.core.Registry.EventPublisher<E extends Object> -
Field Summary
Fields inherited from class io.github.resilience4j.core.registry.AbstractRegistry
CONFIG_MUST_NOT_BE_NULL, configurations, CONSUMER_MUST_NOT_BE_NULL, DEFAULT_CONFIG, entryMap, registryTags, SUPPLIER_MUST_NOT_BE_NULL, TAGS_MUST_NOT_BE_NULL -
Constructor Summary
ConstructorsConstructorDescriptionInMemoryTimerRegistry(TimerConfig defaultConfig, Map<String, TimerConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Timer>> registryEventConsumers, Map<String, String> tags, io.micrometer.core.instrument.MeterRegistry meterRegistry) InMemoryTimerRegistry(Map<String, TimerConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Timer>> registryEventConsumers, Map<String, String> tags, io.micrometer.core.instrument.MeterRegistry meterRegistry) -
Method Summary
Modifier and TypeMethodDescriptionReturns all managedTimerinstances.Returns a managedTimeror creates a new one with the default Timer configuration.timer(String name, TimerConfig config) Returns a managedTimeror creates a new one with a custom Timer configuration.Returns a managedTimeror creates a new one with a custom Timer configuration.Returns a managedTimeror creates a new one.Returns a managedTimeror creates a new one.timer(String name, Supplier<TimerConfig> timerConfigSupplier) Returns a managedTimerConfigor creates a new one with a custom TimerConfig configuration.Returns a managedTimeror creates a new one with a custom Timer configuration.Returns a managedTimeror creates a new one with the default Timer configuration.Methods inherited from class io.github.resilience4j.core.registry.AbstractRegistry
addConfiguration, computeIfAbsent, find, getAllTags, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, removeConfiguration, replaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.resilience4j.core.Registry
addConfiguration, find, getConfiguration, getDefaultConfig, getEventPublisher, getTags, remove, removeConfiguration, replace
-
Constructor Details
-
InMemoryTimerRegistry
-
InMemoryTimerRegistry
public InMemoryTimerRegistry(TimerConfig defaultConfig, Map<String, TimerConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<Timer>> registryEventConsumers, Map<String, String> tags, io.micrometer.core.instrument.MeterRegistry meterRegistry)
-
-
Method Details
-
getAllTimers
Description copied from interface:TimerRegistryReturns all managedTimerinstances.- Specified by:
getAllTimersin interfaceTimerRegistry- Returns:
- all managed
Timerinstances.
-
timer
Description copied from interface:TimerRegistryReturns a managedTimeror creates a new one with the default Timer configuration.- Specified by:
timerin interfaceTimerRegistry- Parameters:
name- the name of the Timer- Returns:
- The
Timer
-
timer
Description copied from interface:TimerRegistryReturns a managedTimeror creates a new one with the default Timer configuration.The
tagspassed will be appended to the tags already configured for the registry. When tags (keys) of the two collide the tags passed with this method will override the tags of the registry.- Specified by:
timerin interfaceTimerRegistry- Parameters:
name- the name of the Timertags- tags added to the Timer- Returns:
- The
Timer
-
timer
Description copied from interface:TimerRegistryReturns a managedTimeror creates a new one with a custom Timer configuration.- Specified by:
timerin interfaceTimerRegistry- Parameters:
name- the name of the Timerconfig- a custom Timer configuration- Returns:
- The
Timer
-
timer
Description copied from interface:TimerRegistryReturns a managedTimeror creates a new one with a custom Timer configuration.The
tagspassed will be appended to the tags already configured for the registry. When tags (keys) of the two collide the tags passed with this method will override the tags of the registry.- Specified by:
timerin interfaceTimerRegistry- Parameters:
name- the name of the TimertimerConfig- a custom Timer configurationtags- tags added to the Timer- Returns:
- The
Timer
-
timer
Description copied from interface:TimerRegistryReturns a managedTimerConfigor creates a new one with a custom TimerConfig configuration.- Specified by:
timerin interfaceTimerRegistry- Parameters:
name- the name of the TimerConfigtimerConfigSupplier- a supplier of a custom TimerConfig configuration- Returns:
- The
TimerConfig
-
timer
Description copied from interface:TimerRegistryReturns a managedTimeror creates a new one with a custom Timer configuration.The
tagspassed will be appended to the tags already configured for the registry. When tags (keys) of the two collide the tags passed with this method will override the tags of the registry.- Specified by:
timerin interfaceTimerRegistry- Parameters:
name- the name of the TimertimerConfigSupplier- a supplier of a custom Timer configurationtags- tags added to the Timer- Returns:
- The
Timer
-
timer
Description copied from interface:TimerRegistryReturns a managedTimeror creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object).- Specified by:
timerin interfaceTimerRegistry- Parameters:
name- the name of the TimerconfigName- the name of the shared configuration- Returns:
- The
Timer
-
timer
Description copied from interface:TimerRegistryReturns a managedTimeror creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object).The
tagspassed will be appended to the tags already configured for the registry. When tags (keys) of the two collide the tags passed with this method will override the tags of the registry.- Specified by:
timerin interfaceTimerRegistry- Parameters:
name- the name of the TimerconfigName- the name of the shared configurationtags- tags added to the Timer- Returns:
- The
Timer
-