/** * Return the constructed collector. */ public CallMeter build() { return new CallMeterImpl(createMetrics()); }
/** * Creates a new instance of {@link RateLimiterExports} with specified metrics names prefix and * {@link Supplier} of rate limiters * * @param prefix the prefix of metrics names * @param rateLimitersSupplier the supplier of rate limiters */ public static RateLimiterExports ofSupplier(String prefix, Supplier<Iterable<RateLimiter>> rateLimitersSupplier) { return new RateLimiterExports(prefix, rateLimitersSupplier); }
/** * Creates a new instance of {@link BulkheadExports} with specified metrics names prefix and * {@link Supplier} of bulkheads * * @param prefix the prefix of metrics names * @param bulkheadSupplier the supplier of bulkheads */ public static BulkheadExports ofSupplier(String prefix, Supplier<Iterable<Bulkhead>> bulkheadSupplier) { return new BulkheadExports(prefix, bulkheadSupplier); }
/** * Creates call meter with the given name and registers it in * the specified collector registry * * @param name - metric name * @param help - metric help * @param registry - collector registry * @return the call meter */ static CallMeter ofCollectorRegistry(String name, String help, CollectorRegistry registry) { return of(name, help).register(registry); }
/** * Registers this call meter with the given registry. */ CallMeter register(CollectorRegistry registry);
/** * Creates a new instance of {@link CircuitBreakerExports} with specified metrics names prefix and * {@link Supplier} of circuit breakers * * @param prefix the prefix of metrics names * @param circuitBreakersSupplier the supplier of circuit breakers */ public static CircuitBreakerExports ofSupplier(String prefix, Supplier<Iterable<CircuitBreaker>> circuitBreakersSupplier) { return new CircuitBreakerExports(prefix, circuitBreakersSupplier); }
/** * Creates a new call meter {@link Builder} * * @return the new {@link Builder} */ static Builder builder() { return new Builder(); }
/** * Creates a new instance of {@link BulkheadExports} with default metrics names prefix and * {@link Supplier} of bulkheads * * @param bulkheadSupplier the supplier of bulkheads */ public static BulkheadExports ofSupplier(Supplier<Iterable<Bulkhead>> bulkheadSupplier) { return new BulkheadExports(DEFAULT_NAME, bulkheadSupplier); }
/** * Creates a new instance of {@link RateLimiterExports} with specified metrics names prefix and * {@link RateLimiterRegistry} as a source of rate limiters. * * @param prefix the prefix of metrics names * @param rateLimitersSupplier the registry of rate limiters */ public static RateLimiterExports ofRateLimiterRegistry(String prefix, RateLimiterRegistry rateLimitersSupplier) { return new RateLimiterExports(prefix, rateLimitersSupplier); }
/** * Creates a new instance of {@link CircuitBreakerExports} with default metrics names prefix and * {@link Supplier} of circuit breakers * * @param circuitBreakersSupplier the supplier of circuit breakers */ public static CircuitBreakerExports ofSupplier(Supplier<Iterable<CircuitBreaker>> circuitBreakersSupplier) { return new CircuitBreakerExports(DEFAULT_NAME, circuitBreakersSupplier); }
/** * Creates a new instance of {@link BulkheadExports} with specified metrics names prefix and * {@link Iterable} of bulkheads. * * @param prefix the prefix of metrics names * @param bulkheads the bulkheads */ public static BulkheadExports ofIterable(String prefix, Iterable<Bulkhead> bulkheads) { return new BulkheadExports(prefix, bulkheads); }
/** * Creates a new instance of {@link RateLimiterExports} with default metrics names prefix and * {@link Iterable} of rate limiters. * * @param rateLimiters the rate limiters */ public static RateLimiterExports ofIterable(Iterable<RateLimiter> rateLimiters) { return new RateLimiterExports(rateLimiters); }
/** * Creates a new instance of {@link BulkheadExports} with default metrics names prefix and * {@link Iterable} of bulkheads. * * @param bulkheads the bulkheads */ public static BulkheadExports ofIterable(Iterable<Bulkhead> bulkheads) { return new BulkheadExports(bulkheads); }
/** * Creates a new instance of {@link RateLimiterExports} with default metrics names prefix and * {@link Supplier} of rate limiters * * @param rateLimitersSupplier the supplier of rate limiters */ public static RateLimiterExports ofSupplier(Supplier<Iterable<RateLimiter>> rateLimitersSupplier) { return new RateLimiterExports(DEFAULT_NAME, rateLimitersSupplier); }
/** * Creates a new instance of {@link BulkheadExports} with specified metrics names prefix and * {@link BulkheadRegistry} as a source of bulkheads. * * @param prefix the prefix of metrics names * @param bulkheadRegistry the registry of bulkheads */ public static BulkheadExports ofBulkheadRegistry(String prefix, BulkheadRegistry bulkheadRegistry) { return new BulkheadExports(prefix, bulkheadRegistry); }
/** * Creates a new instance of {@link RateLimiterExports} with specified metrics names prefix and * {@link Iterable} of rate limiters. * * @param prefix the prefix of metrics names * @param rateLimiters the rate limiters */ public static RateLimiterExports ofIterable(String prefix, Iterable<RateLimiter> rateLimiters) { return new RateLimiterExports(prefix, rateLimiters); }
/** * Creates a new instance of {@link BulkheadExports} with default metrics names prefix and * a bulkhead as a source. * * @param bulkhead the bulkhead */ public static BulkheadExports ofBulkhead(Bulkhead bulkhead) { return new BulkheadExports(Array.of(bulkhead)); }
/** * Creates a new instance of {@link RateLimiterExports} with default metrics names prefix and * {@link RateLimiterRegistry} as a source of rate limiters. * @param rateLimiterRegistry the registry of rate limiters */ public static RateLimiterExports ofRateLimiterRegistry(RateLimiterRegistry rateLimiterRegistry) { return new RateLimiterExports(rateLimiterRegistry.getAllRateLimiters()); }
/** * Creates a new instance of {@link BulkheadExports} with default metrics names prefix and * {@link BulkheadRegistry} as a source of bulkheads. * @param bulkheadRegistry the registry of bulkheads */ public static BulkheadExports ofBulkheadRegistry(BulkheadRegistry bulkheadRegistry) { return new BulkheadExports(bulkheadRegistry.getAllBulkheads()); }