Class FixedThreadPoolBulkhead

java.lang.Object
io.github.resilience4j.bulkhead.internal.FixedThreadPoolBulkhead
All Implemented Interfaces:
ThreadPoolBulkhead, AutoCloseable

public class FixedThreadPoolBulkhead extends Object implements ThreadPoolBulkhead
A Bulkhead implementation based on a fixed ThreadPoolExecutor. which is based into the thread pool execution handling : 1- submit service call through bulk head thread pool 2- if there is free thread from the thread pool or the queue is not yet full , it will be permitted 3- otherwise the thread pool will throw RejectedExecutionException which mean is not permitted
  • Constructor Details

    • FixedThreadPoolBulkhead

      public FixedThreadPoolBulkhead(String name, @Nullable ThreadPoolBulkheadConfig bulkheadConfig)
      Creates a bulkhead using a configuration supplied
      Parameters:
      name - the name of this bulkhead
      bulkheadConfig - custom bulkhead configuration
    • FixedThreadPoolBulkhead

      public FixedThreadPoolBulkhead(String name, @Nullable ThreadPoolBulkheadConfig bulkheadConfig, Map<String,String> tags)
      Creates a bulkhead using a configuration supplied
      Parameters:
      name - the name of this bulkhead
      bulkheadConfig - custom bulkhead configuration
      tags - tags to add to the Bulkhead
    • FixedThreadPoolBulkhead

      public FixedThreadPoolBulkhead(String name)
      Creates a bulkhead with a default config.
      Parameters:
      name - the name of this bulkhead
    • FixedThreadPoolBulkhead

      public FixedThreadPoolBulkhead(String name, Map<String,String> tags)
      Creates a bulkhead with a default config.
      Parameters:
      name - the name of this bulkhead
    • FixedThreadPoolBulkhead

      public FixedThreadPoolBulkhead(String name, Supplier<ThreadPoolBulkheadConfig> configSupplier)
      Create a bulkhead using a configuration supplier
      Parameters:
      name - the name of this bulkhead
      configSupplier - BulkheadConfig supplier
    • FixedThreadPoolBulkhead

      public FixedThreadPoolBulkhead(String name, Supplier<ThreadPoolBulkheadConfig> configSupplier, Map<String,String> tags)
      Create a bulkhead using a configuration supplier
      Parameters:
      name - the name of this bulkhead
      configSupplier - BulkheadConfig supplier
  • Method Details