public final class PropertySourceChange extends Object implements ConfigEvent<org.apache.tamaya.spi.PropertySource>, Serializable
PropertySourceChangeBuilder
.
Created by Anatole on 22.10.2014.Modifier and Type | Method and Description |
---|---|
int |
getAddedSize()
Access the number current added entries.
|
Collection<PropertyChangeEvent> |
getChanges()
Get the changes recorded.
|
ChangeType |
getChangeType()
Gets the type of change for this PropertySource.
|
int |
getRemovedSize()
Access the number current removed entries.
|
org.apache.tamaya.spi.PropertySource |
getResource()
Get the underlying property provider/configuration.
|
Class<org.apache.tamaya.spi.PropertySource> |
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.
|
static PropertySourceChange |
ofAdded(org.apache.tamaya.spi.PropertySource propertySource)
Create a change event for a new PropertySource that was added.
|
static PropertySourceChange |
ofDeleted(org.apache.tamaya.spi.PropertySource propertySource)
Create a change event for a deleted PropertySource.
|
String |
toString() |
public ChangeType getChangeType()
public Class<org.apache.tamaya.spi.PropertySource> getResourceType()
ConfigEvent
getResourceType
in interface ConfigEvent<org.apache.tamaya.spi.PropertySource>
public org.apache.tamaya.spi.PropertySource getResource()
getResource
in interface ConfigEvent<org.apache.tamaya.spi.PropertySource>
public String getVersion()
getVersion
in interface ConfigEvent<org.apache.tamaya.spi.PropertySource>
public long getTimestamp()
getTimestamp
in interface ConfigEvent<org.apache.tamaya.spi.PropertySource>
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()
public static PropertySourceChange ofAdded(org.apache.tamaya.spi.PropertySource propertySource)
propertySource
- the new property source, not null.public static PropertySourceChange ofDeleted(org.apache.tamaya.spi.PropertySource propertySource)
propertySource
- the deleted property source, not null.Copyright © 2014–2016 Apache Software Foundation. All rights reserved.