public abstract class AbstractConfigurationPersister extends Object implements ExtensibleConfigurationPersister
ExtensibleConfigurationPersister
implementations.ConfigurationPersister.PersistenceResource, ConfigurationPersister.SnapshotInfo
NULL_SNAPSHOT_INFO
Constructor and Description |
---|
AbstractConfigurationPersister(org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser)
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 |
marshallAsXml(org.jboss.dmr.ModelNode model,
OutputStream output)
Marshals the given configuration model to XML, writing to the given stream.
|
void |
registerSubsystemWriter(String name,
org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> deparser)
Registers the writer that can marshal to XML the configuration of the
named subsystem.
|
String |
snapshot()
Take a snapshot of the current configuration
|
void |
successfulBoot()
Called once the xml has been successfully parsed, translated into updates, executed in the target controller
and all services have started successfully
|
void |
unregisterSubsystemWriter(String name)
Unregisters the XML configuration writer of the named subsystem.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
load, store
public AbstractConfigurationPersister(org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser)
rootDeparser
- the root model deparserpublic void registerSubsystemWriter(String name, org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> deparser)
SubsystemXmlWriterRegistry
registerSubsystemWriter
in interface SubsystemXmlWriterRegistry
name
- the name of the subsystemdeparser
- the XML writerpublic void unregisterSubsystemWriter(String name)
SubsystemXmlWriterRegistry
unregisterSubsystemWriter
in interface SubsystemXmlWriterRegistry
name
- the name of the subsystempublic void marshallAsXml(org.jboss.dmr.ModelNode model, OutputStream output) throws ConfigurationPersistenceException
marshallAsXml
in interface ConfigurationPersister
model
- the model to persistoutput
- the streamConfigurationPersistenceException
public void successfulBoot() throws ConfigurationPersistenceException
ConfigurationPersister
successfulBoot
in interface ConfigurationPersister
ConfigurationPersistenceException
public String snapshot() throws ConfigurationPersistenceException
ConfigurationPersister
snapshot
in interface ConfigurationPersister
ConfigurationPersistenceException
- if a problem happened when creating the snapshotpublic ConfigurationPersister.SnapshotInfo listSnapshots()
ConfigurationPersister
listSnapshots
in interface ConfigurationPersister
public void deleteSnapshot(String name)
ConfigurationPersister
deleteSnapshot
in interface ConfigurationPersister
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.