public final class ConfigurationContextChangeBuilder extends Object
PropertySource
. Consumers of these events
can observing changes to property sources and
ConfigurationContext
contains the changed PropertySource
(Note: the reference tova property source is never affected by a
change, its only the data of the property source).Configuration
to create a change
event on configuration level.
Modifier and Type | Method and Description |
---|---|
ConfigurationContextChange |
build()
Builds the corresponding change set.
|
ConfigurationContextChangeBuilder |
changedPropertySource(PropertySourceChange propertySourceChange)
This method records all changes to be applied to the base property provider/configuration to
achieve the given target state.
|
boolean |
isEmpty()
Checks if the change set is empty, i.e. does not contain any changes.
|
ConfigurationContextChangeBuilder |
newPropertySource(PropertySource propertySource)
This method records all changes to be applied to the base property provider/configuration to
achieve the given target state.
|
static ConfigurationContextChangeBuilder |
of()
Creates a new instance current this builder.
|
ConfigurationContextChangeBuilder |
removedPropertySource(PropertySource propertySource)
This method records all changes to be applied to the base property provider/configuration to
achieve the given target state.
|
void |
reset()
Resets this change set instance.
|
ConfigurationContextChangeBuilder |
setTimestamp(long timestamp) |
ConfigurationContextChangeBuilder |
setVersion(String version) |
String |
toString() |
public static ConfigurationContextChangeBuilder of()
public ConfigurationContextChangeBuilder setVersion(String version)
public ConfigurationContextChangeBuilder setTimestamp(long timestamp)
public ConfigurationContextChangeBuilder newPropertySource(PropertySource propertySource)
propertySource
- the new target state, not null.public ConfigurationContextChangeBuilder removedPropertySource(PropertySource propertySource)
propertySource
- the new target state, not null.public ConfigurationContextChangeBuilder changedPropertySource(PropertySourceChange propertySourceChange)
propertySourceChange
- the change state, not null.public boolean isEmpty()
public void reset()
public ConfigurationContextChange build()
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.