public interface MutablePropertySource
extends org.apache.tamaya.spi.PropertySource
Modifier and Type | Method and Description |
---|---|
void |
commitTransaction(UUID transactionId)
Commits the request.
|
boolean |
isRemovable(String key)
Checks if a configuration key is removable.
|
boolean |
isWritable(String key)
Checks if a configuration key is writable (or it can be added).
|
MutablePropertySource |
put(UUID transactionId,
String key,
String value)
Sets a property.
|
MutablePropertySource |
putAll(UUID transactionId,
Map<String,String> properties)
Puts all given configuration entries.
|
MutablePropertySource |
remove(UUID transactionId,
Collection<String> keys)
Removes all given configuration entries.
|
MutablePropertySource |
remove(UUID transactionId,
String... keys)
Removes all given configuration entries.
|
void |
rollbackTransaction(UUID transactionId)
Rollback any changes leaving everything unchanged.
|
void |
startTransaction(UUID transactionId)
Start a new transaction context with the given isolation policy.
|
boolean isWritable(String key)
key
- the key to be checked for write access (including creation), not null.boolean isRemovable(String key)
key
- the key to be checked for removal, not null.MutablePropertySource put(UUID transactionId, String key, String value)
key
- the property's key, not null.value
- the property's value, not null.transactionId
- the transactionId used to isolate the change, not null.org.apache.tamaya.ConfigException
- if the key/value cannot be added, or the request is read-only.MutablePropertySource putAll(UUID transactionId, Map<String,String> properties)
ConfigException
. If errors
occur afterwards, when the properties are effectively written back to the backends, the errors should be
collected and returned as part of the ConfigException payload. Nevertheless the operation should in that case
remove all entries as far as possible and abort the writing operation.transactionId
- the transactionId used to isolate the change, not null.properties
- the properties tobe written, not null.org.apache.tamaya.ConfigException
- if any of the given properties could not be written, or the request is read-only.MutablePropertySource remove(UUID transactionId, Collection<String> keys)
ConfigException
. If errors
occur afterwards, when the properties are effectively written back to the backends, the errors should be
collected and returned as part of the ConfigException payload. Nevertheless the operation should in that case
remove all entries as far as possible and abort the writing operation.transactionId
- the transactionId used to isolate the change, not null.keys
- the property's keys to be removedProperties, not null.org.apache.tamaya.ConfigException
- if any of the given keys could not be removedProperties, or the request is read-only.MutablePropertySource remove(UUID transactionId, String... keys)
ConfigException
. If errors
occur afterwards, when the properties are effectively written back to the backends, the errors should be
collected and returned as part of the ConfigException payload. Nevertheless the operation should in that case
remove all entries as far as possible and abort the writing operation.transactionId
- the transactionId used to isolate the change, not null.keys
- the property's keys to be removedProperties, not null.org.apache.tamaya.ConfigException
- if any of the given keys could not be removedProperties, or the request is read-only.void commitTransaction(UUID transactionId)
Configuration
instance,
since visibility of changes also depends on the ordinals set on the PropertySource
s
configured.transactionId
- the transaction id, not null.org.apache.tamaya.ConfigException
- if the request already has been committed or cancelled, or the commit fails.void rollbackTransaction(UUID transactionId)
transactionId
- the transaction id, not null.void startTransaction(UUID transactionId)
transactionId
- the transaction id, not null.Copyright © 2014–2016 Apache Software Foundation. All rights reserved.