All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.smallrye.faulttolerance.DefaultExistingCircuitBreakerNames Maven / Gradle / Ivy

There is a newer version: 6.6.2
Show newest version
package io.smallrye.faulttolerance;

import java.util.Set;

import jakarta.enterprise.inject.spi.BeanManager;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;

@Singleton
public class DefaultExistingCircuitBreakerNames implements ExistingCircuitBreakerNames {
    private final Set names;

    @Inject
    public DefaultExistingCircuitBreakerNames(BeanManager beanManager) {
        FaultToleranceExtension extension = beanManager.getExtension(FaultToleranceExtension.class);
        this.names = extension.getExistingCircuitBreakerNames();
    }

    @Override
    public boolean contains(String name) {
        return names.contains(name);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy