Class AbstractConfigurationPersister
java.lang.Object
org.jboss.as.controller.persistence.AbstractConfigurationPersister
- All Implemented Interfaces:
ConfigurationPersister,ExtensibleConfigurationPersister,SubsystemXmlWriterRegistry
- Direct Known Subclasses:
NullConfigurationPersister,XmlConfigurationPersister
public abstract class AbstractConfigurationPersister
extends Object
implements ExtensibleConfigurationPersister
Abstract superclass for
ExtensibleConfigurationPersister implementations.- Author:
- Brian Stansberry
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.as.controller.persistence.ConfigurationPersister
ConfigurationPersister.PersistenceResource, ConfigurationPersister.SnapshotInfo -
Field Summary
Fields inherited from interface org.jboss.as.controller.persistence.ConfigurationPersister
NULL_SNAPSHOT_INFO -
Constructor Summary
ConstructorsConstructorDescriptionAbstractConfigurationPersister(org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteSnapshot(String name) Deletes a snapshot using its name.Gets the names of the snapshots in the snapshots directoryvoidmarshallAsXml(org.jboss.dmr.ModelNode model, OutputStream output) Marshals the given configuration model to XML, writing to the given stream.voidregisterSubsystemWriter(String name, Supplier<org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext>> writer) Registers the writer that can marshal to XML the configuration of the named subsystem.voidCalled once the xml has been successfully parsed, translated into updates, executed in the target controller and all services have started successfully.voidUnregisters the XML configuration writer of the named subsystem.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.as.controller.persistence.ConfigurationPersister
hasStored, isPersisting, load, publish, snapshot, store
-
Constructor Details
-
AbstractConfigurationPersister
public AbstractConfigurationPersister(org.jboss.staxmapper.XMLElementWriter<ModelMarshallingContext> rootDeparser) Construct a new instance.- Parameters:
rootDeparser- the root model deparser
-
-
Method Details
-
registerSubsystemWriter
public void registerSubsystemWriter(String name, Supplier<org.jboss.staxmapper.XMLElementWriter<SubsystemMarshallingContext>> writer) Description copied from interface:SubsystemXmlWriterRegistryRegisters the writer that can marshal to XML the configuration of the named subsystem.- Specified by:
registerSubsystemWriterin interfaceSubsystemXmlWriterRegistry- Parameters:
name- the name of the subsystemwriter- the XML writer
-
unregisterSubsystemWriter
Description copied from interface:SubsystemXmlWriterRegistryUnregisters the XML configuration writer of the named subsystem.- Specified by:
unregisterSubsystemWriterin interfaceSubsystemXmlWriterRegistry- Parameters:
name- the name of the subsystem
-
marshallAsXml
public void marshallAsXml(org.jboss.dmr.ModelNode model, OutputStream output) throws ConfigurationPersistenceException Marshals the given configuration model to XML, writing to the given stream.- Specified by:
marshallAsXmlin interfaceConfigurationPersister- Parameters:
model- the model to persistoutput- the stream- Throws:
ConfigurationPersistenceException- if a configuration persistence problem occurs
-
successfulBoot
Description copied from interface:ConfigurationPersisterCalled once the xml has been successfully parsed, translated into updates, executed in the target controller and all services have started successfully.- Specified by:
successfulBootin interfaceConfigurationPersister- Throws:
ConfigurationPersistenceException- if a configuration persistence problem occurs- See Also:
-
listSnapshots
Description copied from interface:ConfigurationPersisterGets the names of the snapshots in the snapshots directory- Specified by:
listSnapshotsin interfaceConfigurationPersister- Returns:
- the snapshot info. This will never return null
-
deleteSnapshot
Description copied from interface:ConfigurationPersisterDeletes a snapshot using its name.- Specified by:
deleteSnapshotin interfaceConfigurationPersister- Parameters:
name- the name of the snapshot (as returned byConfigurationPersister.SnapshotInfo.names()returned fromConfigurationPersister.listSnapshots(). The whole name is not needed, just enough to uniquely identify it.
-