org.apache.tamaya.events.delta

## Class ConfigurationContextChange

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

- All Implemented Interfaces:
    Serializable

      public final class ConfigurationContextChange
      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
    --- | ---
    `static ConfigurationContextChange` | `emptyChangeSet()` Get an empty change set for the given provider.
    `Collection<PropertySource>` | `getAddedPropertySources()` Get the property sources to be added.
    `Collection<PropertySourceChange>` | `getPropertySourceChanges()` Get the changes recorded.
    `Collection<PropertySourceChange>` | `getPropertySourceUpdates()` Get the property source updates.
    `Collection<PropertySource>` | `getRemovedPropertySources()` Get the property sources to be removed.
    `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.
    `Collection<PropertySource>` | `getUpdatedPropertySources()` Get the property sources to be updated.
    `String` | `getVersion()` Get the base version, usable for optimistic locking.
    `boolean` | `isAffected(PropertySource propertySource)` Checks if the given propertySource is affected (added, changed or removed).
    `boolean` | `isEmpty()` CHecks if the current change set does not contain any changes.
    `String` | `toString()`

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

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

- - ### Method Detail

    - #### emptyChangeSet

          public static ConfigurationContextChange emptyChangeSet()

      Get an empty change set for the given provider.
      Returns:
        an empty ConfigurationChangeSet instance.

    - #### 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.

    - #### getPropertySourceChanges

          public Collection<PropertySourceChange> getPropertySourceChanges()

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

    - #### getPropertySourceUpdates

          public Collection<PropertySourceChange> getPropertySourceUpdates()

      Get the property source updates.
      Returns:
        the recorded changes, never null.

    - #### getRemovedPropertySources

          public Collection<PropertySource> getRemovedPropertySources()

      Get the property sources to be removed.
      Returns:
        the recorded changes, never null.

    - #### getAddedPropertySources

          public Collection<PropertySource> getAddedPropertySources()

      Get the property sources to be added.
      Returns:
        the recorded changes, never null.

    - #### getUpdatedPropertySources

          public Collection<PropertySource> getUpdatedPropertySources()

      Get the property sources to be updated.
      Returns:
        the recorded changes, never null.

    - #### isAffected

          public boolean isAffected(PropertySource propertySource)

      Checks if the given propertySource is affected (added, changed or removed).
      Parameters:
        `propertySource` - the propertySource, not null.
      Returns:
        true, if the given propertySource ia affected.

    - #### 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.