public class BackupXmlConfigurationPersister extends XmlConfigurationPersister
ConfigurationPersister.PersistenceResource, ConfigurationPersister.SnapshotInfo
NULL_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)
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.
|
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()
Take a snapshot of the current configuration
|
ConfigurationPersister.PersistenceResource |
store(org.jboss.dmr.ModelNode model,
Set<PathAddress> affectedAddresses)
Persist the given configuration model.
|
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, successfulBoot
marshallAsXml, registerSubsystemWriter, unregisterSubsystemWriter
public BackupXmlConfigurationPersister(ConfigurationFile file, QName rootElement, org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> rootParser, org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser)
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 it is ok if ConfigurationFile.getBootFile()
points to an empty filepublic void registerAdditionalRootElement(QName anotherRoot, org.jboss.staxmapper.XMLElementReader<List<org.jboss.dmr.ModelNode>> parser)
registerAdditionalRootElement
in class XmlConfigurationPersister
public void successfulBoot() throws ConfigurationPersistenceException
ConfigurationPersister
successfulBoot
in interface ConfigurationPersister
successfulBoot
in class AbstractConfigurationPersister
ConfigurationPersistenceException
public ConfigurationPersister.PersistenceResource store(org.jboss.dmr.ModelNode model, Set<PathAddress> affectedAddresses) throws ConfigurationPersistenceException
XmlConfigurationPersister
store
in interface ConfigurationPersister
store
in class XmlConfigurationPersister
model
- the model to persistConfigurationPersistenceException
public String snapshot() throws ConfigurationPersistenceException
ConfigurationPersister
snapshot
in interface ConfigurationPersister
snapshot
in class XmlConfigurationPersister
ConfigurationPersistenceException
- if a problem happened when creating the snapshotpublic ConfigurationPersister.SnapshotInfo listSnapshots()
ConfigurationPersister
listSnapshots
in interface ConfigurationPersister
listSnapshots
in class AbstractConfigurationPersister
public void deleteSnapshot(String name)
ConfigurationPersister
deleteSnapshot
in interface ConfigurationPersister
deleteSnapshot
in class AbstractConfigurationPersister
name
- 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 © 2023 JBoss by Red Hat. All rights reserved.