public final class PollOutagesConfigFactory extends PollOutagesConfigManager
AbstractJaxbConfigDao.JaxbReloadCallback
Constructor and Description |
---|
PollOutagesConfigFactory(org.springframework.core.io.Resource resource)
Create a PollOutagesConfigFactory using the specified Spring resource.
|
Modifier and Type | Method and Description |
---|---|
static PollOutagesConfigFactory |
getInstance()
Return the singleton instance of this factory.
|
static void |
init()
Load the config from the default config file and create the singleton
instance of this factory.
|
static void |
reload()
Reload the config from the default config file
|
void |
saveCurrent()
Saves the current in-memory configuration to disk and reloads
|
protected void |
saveXML(String xmlString) |
static void |
setInstance(PollOutagesConfigFactory instance)
setInstance
|
void |
update()
update
|
addOutage, afterPropertiesSet, getConfig, getEndOfOutage, getEndOfOutage, getInterfaces, getNodeIds, getOutage, getOutages, getOutageTimes, getOutageType, getReadLock, getWriteLock, isCurTimeInOutage, isCurTimeInOutage, isInterfaceInOutage, isInterfaceInOutage, isNodeIdInOutage, isNodeIdInOutage, isTimeInOutage, isTimeInOutage, isTimeInOutage, removeOutage, removeOutage, replaceOutage, translateConfig
getConfigResource, getContainer, getDescription, getReloadCheckInterval, loadConfig, setConfigResource, setReloadCheckInterval
public PollOutagesConfigFactory(org.springframework.core.io.Resource resource)
public static void init() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
IOException
- Thrown if the specified config file cannot be readorg.exolab.castor.xml.MarshalException
- Thrown if the file does not conform to the schema.org.exolab.castor.xml.ValidationException
- Thrown if the contents do not match the required schema.IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.public static void reload() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
IOException
- Thrown if the specified config file cannot be
read/loadedorg.exolab.castor.xml.MarshalException
- Thrown if the file does not conform to the schema.org.exolab.castor.xml.ValidationException
- Thrown if the contents do not match the required schema.IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.public static PollOutagesConfigFactory getInstance()
IllegalStateException
- Thrown if the factory has not yet been initialized.public static void setInstance(PollOutagesConfigFactory instance)
setInstance
instance
- a PollOutagesConfigFactory
object.public void saveCurrent() throws org.exolab.castor.xml.MarshalException, IOException, org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
- if any.IOException
- if any.org.exolab.castor.xml.ValidationException
- if any.protected void saveXML(String xmlString) throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public void update() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
update
IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.Copyright © 2016. All rights reserved.