public class SelfContainedConfigurationPersister extends Object implements ExtensibleConfigurationPersister
ConfigurationPersister.PersistenceResource, ConfigurationPersister.SnapshotInfo
NULL_SNAPSHOT_INFO
Constructor and Description |
---|
SelfContainedConfigurationPersister(List<org.jboss.dmr.ModelNode> containerDefinition)
Construct with a pre-computed list of operations.
|
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
|
List<org.jboss.dmr.ModelNode> |
load()
Load the configuration model, returning it as a list of updates to be
executed by the controller.
|
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> writer)
Registers the writer that can marshal to XML the configuration of the
named subsystem.
|
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
|
void |
unregisterSubsystemWriter(String name)
Unregisters the XML configuration writer of the named subsystem.
|
public SelfContainedConfigurationPersister(List<org.jboss.dmr.ModelNode> containerDefinition)
containerDefinition
- The list of configuration operations.public ConfigurationPersister.PersistenceResource store(org.jboss.dmr.ModelNode model, Set<PathAddress> affectedAddresses) throws ConfigurationPersistenceException
ConfigurationPersister
store
in interface ConfigurationPersister
model
- the model to persistConfigurationPersistenceException
public void marshallAsXml(org.jboss.dmr.ModelNode model, OutputStream output) throws ConfigurationPersistenceException
ConfigurationPersister
marshallAsXml
in interface ConfigurationPersister
model
- the model to persistoutput
- the streamConfigurationPersistenceException
public List<org.jboss.dmr.ModelNode> load() throws ConfigurationPersistenceException
ConfigurationPersister
load
in interface ConfigurationPersister
ConfigurationPersistenceException
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.public void registerSubsystemWriter(String name, org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext> writer)
SubsystemXmlWriterRegistry
registerSubsystemWriter
in interface SubsystemXmlWriterRegistry
name
- the name of the subsystemwriter
- the XML writerpublic void unregisterSubsystemWriter(String name)
SubsystemXmlWriterRegistry
unregisterSubsystemWriter
in interface SubsystemXmlWriterRegistry
name
- the name of the subsystemCopyright © 2023 JBoss by Red Hat. All rights reserved.