public final class ConfigurationChange extends Object implements ConfigEvent<org.apache.tamaya.Configuration>, Serializable
PropertySourceChangeBuilder
.
Created by Anatole on 22.10.2014.Modifier and Type | Method and Description |
---|---|
static ConfigurationChange |
emptyChangeSet(org.apache.tamaya.Configuration configuration)
Get an empty change set for the given provider.
|
int |
getAddedSize()
Access the number current added entries.
|
Collection<PropertyChangeEvent> |
getChanges()
Get the changes recorded.
|
int |
getRemovedSize()
Access the number current removed entries.
|
org.apache.tamaya.Configuration |
getResource()
Get the underlying property provider/configuration.
|
Class<org.apache.tamaya.Configuration> |
getResourceType()
Access the type of resource.
|
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 |
isKeyAffected(String key)
Checks if the given key is added, or updated AND NOT removed.
|
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(org.apache.tamaya.Configuration configuration)
configuration
- The configuration changed, not null.public Class<org.apache.tamaya.Configuration> getResourceType()
ConfigEvent
getResourceType
in interface ConfigEvent<org.apache.tamaya.Configuration>
public org.apache.tamaya.Configuration getResource()
getResource
in interface ConfigEvent<org.apache.tamaya.Configuration>
public String getVersion()
getVersion
in interface ConfigEvent<org.apache.tamaya.Configuration>
public long getTimestamp()
getTimestamp
in interface ConfigEvent<org.apache.tamaya.Configuration>
public Collection<PropertyChangeEvent> getChanges()
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 isKeyAffected(String key)
key
- the target key, not null.public boolean isEmpty()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.