public abstract class ConfigRepositoryBase extends ConfigObject implements IConfigRepository
This class supplies the base implementation for a configuration repository. The provider should extend this class and complete the implementation.
getTracer
public final IConfigSimpleEntityContainer createSimpleEntityContainerObject(String address, boolean markAsDirty) throws EConfigException
addr
- The address of the entity container. The address must start
with '/'. An IllegalArgumentException
is thrown in otherwise.markAsDirty
- Indicates whether the newly created object should be
marked as dirty. The value supplied to this parameter is typically false
when objects are created by the provider during the initial repository
open.EConfigException
- Thrown in case the repository already has a content
object at the supplied address.This method is intended for use by provider implementations to create simple entity container objects when loaded from the durable storage.
public final IConfigComplexEntityContainer createComplexEntityContainerObject(String address, boolean markAsDirty) throws EConfigException
addr
- The address of the entity container. The address must start
with '/'. An IllegalArgumentException
is thrown in otherwise.markAsDirty
- Indicates whether the newly created object should be
marked as dirty. The value supplied to this parameter is typically false
when objects are created by the provider during the initial repository
open.EConfigException
- Thrown in case the repository already has a content
object at the supplied address.This method is intended for use by provider implementations to create complex entity container objects when loaded from the durable storage.
public final String getDescriptor()
IConfigRepository.getDescriptor()
getDescriptor
in interface IConfigRepository
public final IConfigSimpleEntityContainer createSimpleEntityContainer(String address) throws EConfigException
IConfigRepository.createSimpleEntityContainer(java.lang.String)
createSimpleEntityContainer
in interface IConfigRepository
address
- The address of the entity container. The address must start
with '/'. An IllegalArgumentException
is thrown in otherwise.EConfigException
- Thrown in case the repository already has a content
object at the supplied address.public final IConfigComplexEntityContainer createComplexEntityContainer(String address) throws EConfigException
IConfigRepository.createComplexEntityContainer(java.lang.String)
createComplexEntityContainer
in interface IConfigRepository
address
- The address of the entity container. The address must start
with '/'. An IllegalArgumentException
is thrown in otherwise.EConfigException
- Thrown in case the repository already has a content
object at the supplied address.public final IConfigSimpleEntityContainer getSimpleEntityContainer(String address)
IConfigRepository.getSimpleEntityContainer(java.lang.String)
getSimpleEntityContainer
in interface IConfigRepository
address
- The address of the entity container.public final IConfigComplexEntityContainer getComplexEntityContainer(String address)
IConfigRepository.getComplexEntityContainer(java.lang.String)
getComplexEntityContainer
in interface IConfigRepository
address
- The address of the entity container.public final IConfigSimpleEntity getSimpleEntity(String address)
IConfigRepository.getSimpleEntity(java.lang.String)
getSimpleEntity
in interface IConfigRepository
address
- The address of the entity.public final IConfigComplexEntity getComplexEntity(String address)
IConfigRepository.getComplexEntity(java.lang.String)
getComplexEntity
in interface IConfigRepository
address
- The address of the entity.public final IConfigSimpleEntityContainer removeSimpleEntityContainer(String address)
IConfigRepository.removeSimpleEntityContainer(java.lang.String)
removeSimpleEntityContainer
in interface IConfigRepository
address
- The address of the entity container to remove.public final IConfigComplexEntityContainer removeComplexEntityContainer(String address)
IConfigRepository.removeComplexEntityContainer(java.lang.String)
removeComplexEntityContainer
in interface IConfigRepository
address
- The address of the entity container to remove.public final void traverse(String filter, IConfigTraversalCallback callback)
IConfigRepository.traverse(java.lang.String, com.neeve.config.IConfigTraversalCallback)
traverse
in interface IConfigRepository
filter
- The address filter. The '*' character matches one or more
characters. "..." is a level wilcard i.e. it matches everything at and
below the level at which "..." appears. For example, "a*\/b*" will match
"aa/ba" and "ab/bb" while "a*\/b*\/..." will match "aa/bb/c/d/e/f" and
"ab/bb/c".callback
- The callback notified for each of the config objects
encountered during the traversal.public final void serialize(StringBuilder builder)
IConfigRepository.serialize(java.lang.StringBuilder)
serialize
in interface IConfigRepository
public final void deserialize(String str, boolean markAsDirty) throws EConfigException
IConfigRepository.deserialize(java.lang.String, boolean)
deserialize
in interface IConfigRepository
str
- The string to derialize from.markAsDirty
- Indicates whether the created entity and entity container
objects are marked as dirty or not.EConfigException
public final void commit() throws EConfigException
IConfigRepository.commit()
commit
in interface IConfigRepository
EConfigException
- Thrown in case an error was encountered in committing
the changes to storage.
This method commits any changes made to the repository to durable storage (determined by parameters passed to the configuration provider during repository open). The method walks through each entity and entity container that has changed since the repository was opened or last committed and delegates the commit for each one of them to the configuration provider.
public final void close() throws EConfigException
IConfigRepository.close()
close
in interface IConfigRepository
EConfigException
- Thrown in case an error was encountered in closing
the repository
This method closes the respository. This method should be the last call made to the respository.
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.