Class InMemoryTimeLimiterRegistry
- All Implemented Interfaces:
io.github.resilience4j.core.Registry<TimeLimiter,,TimeLimiterConfig> TimeLimiterRegistry
-
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
ConstructorsConstructorDescriptionThe constructor with default default.InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig) The constructor with custom default config.InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter> registryEventConsumer) InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter> registryEventConsumer, Map<String, String> tags) InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter>> registryEventConsumers) InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter>> registryEventConsumers, Map<String, String> tags) InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig, Map<String, String> tags) InMemoryTimeLimiterRegistry(Map<String, TimeLimiterConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter> registryEventConsumer) InMemoryTimeLimiterRegistry(Map<String, TimeLimiterConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter> registryEventConsumer, Map<String, String> tags) InMemoryTimeLimiterRegistry(Map<String, TimeLimiterConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter>> registryEventConsumers) InMemoryTimeLimiterRegistry(Map<String, TimeLimiterConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter>> registryEventConsumers, Map<String, String> tags) InMemoryTimeLimiterRegistry(Map<String, TimeLimiterConfig> configs, Map<String, String> tags) -
Method Summary
Modifier and TypeMethodDescriptionReturns all managedTimeLimiterinstances.timeLimiter(String name) Returns a managedTimeLimiteror creates a new one with the default TimeLimiter configuration.timeLimiter(String name, TimeLimiterConfig config) Returns a managedTimeLimiteror creates a new one with a custom TimeLimiter configuration.timeLimiter(String name, TimeLimiterConfig timeLimiterConfig, Map<String, String> tags) Returns a managedTimeLimiteror creates a new one with a custom TimeLimiter configuration.timeLimiter(String name, String configName) Returns a managedTimeLimiteror creates a new one.Returns a managedTimeLimiteror creates a new one.timeLimiter(String name, Supplier<TimeLimiterConfig> timeLimiterConfigSupplier) Returns a managedTimeLimiterConfigor creates a new one with a custom TimeLimiterConfig configuration.timeLimiter(String name, Supplier<TimeLimiterConfig> timeLimiterConfigSupplier, Map<String, String> tags) Returns a managedTimeLimiteror creates a new one with a custom TimeLimiter configuration.timeLimiter(String name, Map<String, String> tags) Returns a managedTimeLimiteror creates a new one with the default TimeLimiter 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
-
InMemoryTimeLimiterRegistry
public InMemoryTimeLimiterRegistry()The constructor with default default. -
InMemoryTimeLimiterRegistry
-
InMemoryTimeLimiterRegistry
-
InMemoryTimeLimiterRegistry
public InMemoryTimeLimiterRegistry(Map<String, TimeLimiterConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter> registryEventConsumer) -
InMemoryTimeLimiterRegistry
public InMemoryTimeLimiterRegistry(Map<String, TimeLimiterConfig> configs, io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter> registryEventConsumer, Map<String, String> tags) -
InMemoryTimeLimiterRegistry
public InMemoryTimeLimiterRegistry(Map<String, TimeLimiterConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter>> registryEventConsumers) -
InMemoryTimeLimiterRegistry
public InMemoryTimeLimiterRegistry(Map<String, TimeLimiterConfig> configs, List<io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter>> registryEventConsumers, Map<String, String> tags) -
InMemoryTimeLimiterRegistry
The constructor with custom default config.- Parameters:
defaultConfig- The default config.
-
InMemoryTimeLimiterRegistry
-
InMemoryTimeLimiterRegistry
public InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter> registryEventConsumer) -
InMemoryTimeLimiterRegistry
public InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig, io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter> registryEventConsumer, Map<String, String> tags) -
InMemoryTimeLimiterRegistry
public InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter>> registryEventConsumers) -
InMemoryTimeLimiterRegistry
public InMemoryTimeLimiterRegistry(TimeLimiterConfig defaultConfig, List<io.github.resilience4j.core.registry.RegistryEventConsumer<TimeLimiter>> registryEventConsumers, Map<String, String> tags)
-
-
Method Details
-
getAllTimeLimiters
Returns all managedTimeLimiterinstances.- Specified by:
getAllTimeLimitersin interfaceTimeLimiterRegistry- Returns:
- all managed
TimeLimiterinstances.
-
timeLimiter
Returns a managedTimeLimiteror creates a new one with the default TimeLimiter configuration.- Specified by:
timeLimiterin interfaceTimeLimiterRegistry- Parameters:
name- the name of the TimeLimiter- Returns:
- The
TimeLimiter
-
timeLimiter
Description copied from interface:TimeLimiterRegistryReturns a managedTimeLimiteror creates a new one with the default TimeLimiter 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:
timeLimiterin interfaceTimeLimiterRegistry- Parameters:
name- the name of the TimeLimitertags- tags added to the TimeLimiter- Returns:
- The
TimeLimiter
-
timeLimiter
Returns a managedTimeLimiteror creates a new one with a custom TimeLimiter configuration.- Specified by:
timeLimiterin interfaceTimeLimiterRegistry- Parameters:
name- the name of the TimeLimiterconfig- a custom TimeLimiter configuration- Returns:
- The
TimeLimiter
-
timeLimiter
public TimeLimiter timeLimiter(String name, TimeLimiterConfig timeLimiterConfig, Map<String, String> tags) Description copied from interface:TimeLimiterRegistryReturns a managedTimeLimiteror creates a new one with a custom TimeLimiter 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:
timeLimiterin interfaceTimeLimiterRegistry- Parameters:
name- the name of the TimeLimitertimeLimiterConfig- a custom TimeLimiter configurationtags- tags added to the TimeLimiter- Returns:
- The
TimeLimiter
-
timeLimiter
Returns a managedTimeLimiterConfigor creates a new one with a custom TimeLimiterConfig configuration.- Specified by:
timeLimiterin interfaceTimeLimiterRegistry- Parameters:
name- the name of the TimeLimiterConfigtimeLimiterConfigSupplier- a supplier of a custom TimeLimiterConfig configuration- Returns:
- The
TimeLimiterConfig
-
timeLimiter
public TimeLimiter timeLimiter(String name, Supplier<TimeLimiterConfig> timeLimiterConfigSupplier, Map<String, String> tags) Description copied from interface:TimeLimiterRegistryReturns a managedTimeLimiteror creates a new one with a custom TimeLimiter 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:
timeLimiterin interfaceTimeLimiterRegistry- Parameters:
name- the name of the TimeLimitertimeLimiterConfigSupplier- a supplier of a custom TimeLimiter configurationtags- tags added to the TimeLimiter- Returns:
- The
TimeLimiter
-
timeLimiter
Returns a managedTimeLimiteror creates a new one. The configuration must have been added upfront viaRegistry.addConfiguration(String, Object).- Specified by:
timeLimiterin interfaceTimeLimiterRegistry- Parameters:
name- the name of the TimeLimiterconfigName- the name of the shared configuration- Returns:
- The
TimeLimiter
-
timeLimiter
Description copied from interface:TimeLimiterRegistryReturns a managedTimeLimiteror 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:
timeLimiterin interfaceTimeLimiterRegistry- Parameters:
name- the name of the TimeLimiterconfigName- the name of the shared configurationtags- tags added to the TimeLimiter- Returns:
- The
TimeLimiter
-