org.apache.tamaya.events.delta

## Class ConfigurationChange

- java.lang.Object
- - org.apache.tamaya.events.delta.ConfigurationChange

- All Implemented Interfaces:
    Serializable

      public final class ConfigurationChange
      extends Object
      implements Serializable

  Event that contains a set current changes that were applied or could be applied. This class is immutable and thread-safe. To create instances use `PropertySourceChangeBuilder`. Created by Anatole on 22.10.2014.
  See Also:
    Serialized Form

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsKey(String key)` Checks if the given key is added, or updated AND NOT removed.
    `static ConfigurationChange` | `emptyChangeSet(Configuration configuration)` Get an empty change set for the given provider.
    `int` | `getAddedSize()` Access the number current added entries.
    `Configuration` | `getConfiguration()` Get the underlying property provider/configuration.
    `Collection<PropertyChangeEvent>` | `getEvents()` Get the changes recorded.
    `int` | `getRemovedSize()` Access the number current removed entries.
    `long` | `getTimestamp()` Get the timestamp in millis from the current epoch. it is expected that the timestamp and the version are unique to identify a changeset.
    `int` | `getUpdatedSize()` Access the number current updated entries.
    `String` | `getVersion()` Get the base version, usable for optimistic locking.
    `boolean` | `isAdded(String key)` Checks if the given key was added.
    `boolean` | `isEmpty()` CHecks if the current change set does not contain any changes.
    `boolean` | `isRemoved(String key)` Checks if the given key was removed.
    `boolean` | `isUpdated(String key)` Checks if the given key was updated.
    `String` | `toString()`

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

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

- - ### Method Detail

    - #### emptyChangeSet

          public static ConfigurationChange emptyChangeSet(Configuration configuration)

      Get an empty change set for the given provider.
      Parameters:
        `configuration` - The configuration changed, not null.
      Returns:
        an empty ConfigurationChangeSet instance.

    - #### getConfiguration

          public Configuration getConfiguration()

      Get the underlying property provider/configuration.
      Returns:
        the underlying property provider/configuration, never null.

    - #### getVersion

          public String getVersion()

      Get the base version, usable for optimistic locking.
      Returns:
        the base version.

    - #### getTimestamp

          public long getTimestamp()

      Get the timestamp in millis from the current epoch. it is expected that the timestamp and the version are unique to identify a changeset.
      Returns:
        the timestamp, when this changeset was created.

    - #### getEvents

          public Collection<PropertyChangeEvent> getEvents()

      Get the changes recorded.
      Returns:
        the recorded changes, never null.

    - #### getRemovedSize

          public int getRemovedSize()

      Access the number current removed entries.
      Returns:
        the number current removed entries.

    - #### getAddedSize

          public int getAddedSize()

      Access the number current added entries.
      Returns:
        the number current added entries.

    - #### getUpdatedSize

          public int getUpdatedSize()

      Access the number current updated entries.
      Returns:
        the number current updated entries.

    - #### isRemoved

          public boolean isRemoved(String key)

      Checks if the given key was removed.
      Parameters:
        `key` - the target key, not null.
      Returns:
        true, if the given key was removed.

    - #### isAdded

          public boolean isAdded(String key)

      Checks if the given key was added.
      Parameters:
        `key` - the target key, not null.
      Returns:
        true, if the given key was added.

    - #### isUpdated

          public boolean isUpdated(String key)

      Checks if the given key was updated.
      Parameters:
        `key` - the target key, not null.
      Returns:
        true, if the given key was updated.

    - #### containsKey

          public boolean containsKey(String key)

      Checks if the given key is added, or updated AND NOT removed.
      Parameters:
        `key` - the target key, not null.
      Returns:
        true, if the given key was added, or updated BUT NOT removed.

    - #### isEmpty

          public boolean isEmpty()

      CHecks if the current change set does not contain any changes.
      Returns:
        tru, if the change set is empty.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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