/** * 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 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 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 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 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 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 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()); }
/** * Creates a new instance of {@link BulkheadExports} with default metrics names prefix and * a bulkhead as a source. * * @param prefix the prefix of metrics names * @param bulkhead the bulkhead */ public static BulkheadExports ofBulkhead(String prefix, Bulkhead bulkhead) { return new BulkheadExports(prefix, Array.of(bulkhead)); }