Package org.apache.commons.collections4.bloomfilter

# Class LayerManager.Builder

java.lang.Object
org.apache.commons.collections4.bloomfilter.LayerManager.Builder

Enclosing class:
  LayerManager

public static class LayerManager.Builder extends Object
Builder to create Layer Manager

- ## Method Summary

  Modifier and Type
  Method
  Description
  `LayerManager`
  `build()`
  Builds the layer manager with the specified properties.
  `LayerManager.Builder`
  `setCleanup(Consumer<LinkedList<BloomFilter>> cleanup)`
  Sets the Consumer that cleans the list of Bloom filters.
  `LayerManager.Builder`
  `setExtendCheck(Predicate<LayerManager> extendCheck)`
  Sets the extendCheck predicate.
  `LayerManager.Builder`
  `setSupplier(Supplier<BloomFilter> supplier)`
  Sets the supplier of Bloom filters.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### build

    public LayerManager build()
    Builds the layer manager with the specified properties.
    Returns:
      a new LayerManager.

  - ### setCleanup

    public LayerManager.Builder setCleanup(Consumer<LinkedList<BloomFilter>> cleanup)
    Sets the Consumer that cleans the list of Bloom filters.
    Parameters:
      `cleanup` - the Consumer that will modify the list of filters removing out dated or stale filters.
    Returns:
      this for chaining.

  - ### setExtendCheck

    public LayerManager.Builder setExtendCheck(Predicate<LayerManager> extendCheck)
    Sets the extendCheck predicate. When the predicate returns `true` a new target will be created.
    Parameters:
      `extendCheck` - The predicate to determine if a new target should be created.
    Returns:
      this for chaining.

  - ### setSupplier

    public LayerManager.Builder setSupplier(Supplier<BloomFilter> supplier)
    Sets the supplier of Bloom filters. When extendCheck creates a new target, the supplier provides the instance of the Bloom filter.
    Parameters:
      `supplier` - The supplier of new Bloom filter instances.
    Returns:
      this for chaining.