org.apache.tamaya.inject.api

## Enum LoadPolicy

- java.lang.Object
- - java.lang.Enum<LoadPolicy>
  - - org.apache.tamaya.inject.api.LoadPolicy

- All Implemented Interfaces:
    Serializable, Comparable<LoadPolicy>

      public enum LoadPolicy
      extends Enum<LoadPolicy>

  Available policies that describe how changes affecting configured values are published/reinjected for a `DynamicValue`. The policy also affects the cases were any configured listeners/listener methods are called for propagation current configuration changes.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ALWAYS` The configuration value is evaluated evertime it is accessed.
    `INITIAL` The configuration keys is evaluated once, when the owning component is loaded/configured, but never updated later.
    `LAZY` The configuration keys is evaluated exactly once on its first access/use lazily, but never updated later.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static LoadPolicy` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static LoadPolicy[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### INITIAL

          public static final LoadPolicy INITIAL

      The configuration keys is evaluated once, when the owning component is loaded/configured, but never updated later.

    - #### LAZY

          public static final LoadPolicy LAZY

      The configuration keys is evaluated exactly once on its first access/use lazily, but never updated later.
      See Also:
        `DynamicValue.get()`, `DynamicValue.commitAndGet()`

    - #### ALWAYS

          public static final LoadPolicy ALWAYS

      The configuration value is evaluated evertime it is accessed.

  - ### Method Detail

    - #### values

          public static LoadPolicy[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (LoadPolicy c : LoadPolicy.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static LoadPolicy valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        `NullPointerException` - if the argument is null

Copyright © 2014–2016 Apache Software Foundation. All rights reserved.