public class LoggingRepositoryBuilder extends AbstractRepositoryBuilder
The following extra capabilities are supported:
Example:LoggingRepositoryBuilder loggingBuilder = new LoggingRepositoryBuilder(); loggingBuilder.setActualRepositoryBuilder(...); Repository repo = loggingBuilder.build();
| Constructor and Description |
|---|
LoggingRepositoryBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Repository |
build(java.util.concurrent.atomic.AtomicReference<Repository> rootRef)
Builds a repository instance.
|
void |
errorCheck(java.util.Collection<java.lang.String> messages)
This method is called by assertReady, and subclasses must override to
perform custom checks.
|
RepositoryBuilder |
getActualRepositoryBuilder()
Returns the Repository that all calls are wrapped to.
|
Log |
getLog()
Return the Log to use.
|
java.lang.String |
getName()
Returns the name of the repository.
|
boolean |
isMaster()
Returns true if repository should assume the role of master, which is
true by default.
|
void |
setActualRepositoryBuilder(RepositoryBuilder builder)
Set the Repository to wrap all calls to.
|
void |
setLog(Log log)
Set the Log to use.
|
void |
setMaster(boolean master)
Set to false if repository should not assume the role of master.
|
void |
setName(java.lang.String name)
Set name for the repository, which is required.
|
addTriggerFactory, assertReady, build, getTriggerFactories, removeTriggerFactorypublic Repository build(java.util.concurrent.atomic.AtomicReference<Repository> rootRef) throws RepositoryException
RepositoryBuilderIf the repository is being wrapped by a parent repository, the child repository will need to know this fact for some operations to work correctly. Since the parent repository is not built yet, a reference is used instead.
rootRef - reference to root parent repository, to be set by
parent repository upon being builtConfigurationException - if there is a problem in the builder's configurationRepositoryException - if there is a general problem opening the repositorypublic void setName(java.lang.String name)
RepositoryBuilderpublic java.lang.String getName()
RepositoryBuilderpublic void setMaster(boolean master)
RepositoryBuilderA master repository is responsible for version and
sequence properties. For insert operations, a master
repository must set these properties if they are uninitialized. For
updates, the version property is checked to see if an OptimisticLockException should be thrown.
ReplicatedRepositoryBuilderpublic boolean isMaster()
RepositoryBuilderA master repository is responsible for version and
sequence properties. For insert operations, a master
repository must set these properties if they are uninitialized. For
updates, the version property is checked to see if an OptimisticLockException should be thrown.
ReplicatedRepositoryBuilderpublic void setLog(Log log)
public Log getLog()
public void setActualRepositoryBuilder(RepositoryBuilder builder)
public RepositoryBuilder getActualRepositoryBuilder()
public void errorCheck(java.util.Collection<java.lang.String> messages)
throws ConfigurationException
AbstractRepositoryBuildersuper.errorCheck as well.errorCheck in class AbstractRepositoryBuildermessages - add any error messages to this listConfigurationException - if error checking indirectly caused
another exceptionCopyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.