public final class ConfigurationChange extends Object implements Serializable
PropertySourceChangeBuilder
.
Created by Anatole on 22.10.2014.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() |
public static ConfigurationChange emptyChangeSet(Configuration configuration)
configuration
- The configuration changed, not null.public Configuration getConfiguration()
public String getVersion()
public long getTimestamp()
public Collection<PropertyChangeEvent> getEvents()
public int getRemovedSize()
public int getAddedSize()
public int getUpdatedSize()
public boolean isRemoved(String key)
key
- the target key, not null.public boolean isAdded(String key)
key
- the target key, not null.public boolean isUpdated(String key)
key
- the target key, not null.public boolean containsKey(String key)
key
- the target key, not null.public boolean isEmpty()
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.