public class BackupXmlConfigurationPersister extends XmlConfigurationPersister
ConfigurationPersister.PersistenceResource, ConfigurationPersister.SnapshotInfoNULL_SNAPSHOT_INFO| Constructor and Description |
|---|
BackupXmlConfigurationPersister(ConfigurationFile file,
QName rootElement,
org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> rootParser,
org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser,
boolean suppressLoad)
Construct a new instance.
|
BackupXmlConfigurationPersister(ConfigurationFile file,
QName rootElement,
org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> rootParser,
org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser,
boolean reload,
boolean allowEmpty)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteSnapshot(String name)
Deletes a snapshot using its name.
|
boolean |
isPersisting()
Overrides the default behavior to return
false until successfulBoot() has been called. |
ConfigurationPersister.SnapshotInfo |
listSnapshots()
Gets the names of the snapshots in the snapshots directory
|
void |
registerAdditionalRootElement(QName anotherRoot,
org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> parser) |
String |
snapshot(String name,
String comment)
Take a snapshot of the current configuration.
|
ConfigurationPersister.PersistenceResource |
store(org.jboss.dmr.ModelNode model,
Set<PathAddress> affectedAddresses)
Persist the given configuration model if
ConfigurationPersister.isPersisting() would return true, otherwise
return a no-op ConfigurationPersister.PersistenceResource. |
void |
successfulBoot()
Called once the xml has been successfully parsed, translated into updates, executed in the target controller
and all services have started successfully.
|
load, successfulBootmarshallAsXml, registerSubsystemWriter, registerSubsystemWriter, unregisterSubsystemWriterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublish, snapshotpublic BackupXmlConfigurationPersister(ConfigurationFile file, QName rootElement, org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> rootParser, org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser, boolean suppressLoad)
file - the configuration base filerootElement - the root element of the configuration filerootParser - the root model parserrootDeparser - the root model deparserpublic BackupXmlConfigurationPersister(ConfigurationFile file, QName rootElement, org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> rootParser, org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser, boolean reload, boolean allowEmpty)
file - the configuration base filerootElement - the root element of the configuration filerootParser - the root model parserrootDeparser - the root model deparserreload - true if this is a reloadallowEmpty - true if true it is ok for this file to be 0 bytes
otherwise this is an errorpublic void registerAdditionalRootElement(QName anotherRoot, org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> parser)
registerAdditionalRootElement in class XmlConfigurationPersisterpublic void successfulBoot()
throws ConfigurationPersistenceException
ConfigurationPersistersuccessfulBoot in interface ConfigurationPersistersuccessfulBoot in class AbstractConfigurationPersisterConfigurationPersistenceExceptionConfigurationPersister.isPersisting()public boolean isPersisting()
false until successfulBoot() has been called.true if successfulBoot() has been called; false otherwisepublic ConfigurationPersister.PersistenceResource store(org.jboss.dmr.ModelNode model, Set<PathAddress> affectedAddresses) throws ConfigurationPersistenceException
XmlConfigurationPersisterConfigurationPersister.isPersisting() would return true, otherwise
return a no-op ConfigurationPersister.PersistenceResource.store in interface ConfigurationPersisterstore in class XmlConfigurationPersistermodel - the model to persistaffectedAddresses - the addresses of the resources that were changednullConfigurationPersistenceExceptionpublic String snapshot(String name, String comment) throws ConfigurationPersistenceException
ConfigurationPersistercomment - optionnal messageConfigurationPersistenceException - if a problem happened when creating the snapshotpublic ConfigurationPersister.SnapshotInfo listSnapshots()
ConfigurationPersisterlistSnapshots in interface ConfigurationPersisterlistSnapshots in class AbstractConfigurationPersisterpublic void deleteSnapshot(String name)
ConfigurationPersisterdeleteSnapshot in interface ConfigurationPersisterdeleteSnapshot in class AbstractConfigurationPersistername - the name of the snapshot (as returned by ConfigurationPersister.SnapshotInfo.names() returned from ConfigurationPersister.listSnapshots(). The whole name is not
needed, just enough to uniquely identify it.Copyright © 2021 JBoss by Red Hat. All rights reserved.