Enum Class ScopedSupplier

java.lang.Object
java.lang.Enum<ScopedSupplier>
io.nosqlbench.engine.api.scoping.ScopedSupplier
All Implemented Interfaces:
Serializable, Comparable<ScopedSupplier>, Constable

public enum ScopedSupplier extends Enum<ScopedSupplier>
Helper class to consolidate the notions of scoping items over different NB layers of execution.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    When a supplier is instantiated for caller scope, each time the supplier is accessed, it returns a new instance according to the inner supplier's semantics.
    Once a supplier is instantiated for singleton scope, it should provide only one instance of the supplied element for that instance.
    Once a supplier is instantiated for thread scope, it should provide a unique instance of the supplied element for each thread, according to the inner supplier's semantics.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Supplier<T>
    supplier(Supplier<T> supplier)
     
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • singleton

      public static final ScopedSupplier singleton
      Once a supplier is instantiated for singleton scope, it should provide only one instance of the supplied element for that instance. Multiple instances (separately constructed) of the supplier can each provide their own distinct supplied instance.
    • thread

      public static final ScopedSupplier thread
      Once a supplier is instantiated for thread scope, it should provide a unique instance of the supplied element for each thread, according to the inner supplier's semantics.
    • caller

      public static final ScopedSupplier caller
      When a supplier is instantiated for caller scope, each time the supplier is accessed, it returns a new instance according to the inner supplier's semantics.
  • Method Details

    • values

      public static ScopedSupplier[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ScopedSupplier valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • supplier

      public <T> Supplier<T> supplier(Supplier<T> supplier)