public class OverrideableThreshdDaoImpl extends AbstractThreshdDao implements OverrideableThreshdDao
JSON_STORE_KEY
Constructor and Description |
---|
OverrideableThreshdDaoImpl() |
Modifier and Type | Method and Description |
---|---|
ThreshdConfiguration |
getReadOnlyConfig()
Get the current configuration.
|
void |
onConfigChanged()
Notify the DAO that the configuration it tracks has changed.
|
void |
overrideConfig(InputStream config) |
void |
overrideConfig(ThreshdConfiguration config) |
void |
reload()
Subclasses should call this reload after they have performed their reload logic.
|
void |
saveConfig()
Save the current configuration held by the DAO.
|
interfaceInPackage, rebuildPackageIpListMap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWriteableConfig
interfaceInPackage, rebuildPackageIpListMap, serviceInPackageAndEnabled
public void overrideConfig(ThreshdConfiguration config)
overrideConfig
in interface OverrideableDao<ThreshdConfiguration>
public void overrideConfig(InputStream config)
overrideConfig
in interface OverrideableDao<ThreshdConfiguration>
public void saveConfig()
WriteableDao
The configuration held by the DAO may not necessarily be the same configuration reference as returned by
WriteableDao.getWriteableConfig()
if the config has been reloaded in between calls. This implies any changes to the
reference
returned by WriteableDao.getWriteableConfig()
will not be reflected when saved in this case.
saveConfig
in interface WriteableDao<ThreshdConfiguration>
public void onConfigChanged()
WriteableDao
Call this method after updating the filesystem configuration directly or after providing a config extension.
onConfigChanged
in interface WriteableDao<ThreshdConfiguration>
public ThreshdConfiguration getReadOnlyConfig()
ReadableDao
ReadableDao.reload()
.
The value returned by this method may be the result of merging multiple objects together. As a result, mutations
to this object may not be visible to other readers and are not permitted.
For cases where mutation and/or persistence of changes is required see WriteableDao.getWriteableConfig()
.getReadOnlyConfig
in interface ReadableDao<ThreshdConfiguration>
public void reload()
AbstractThreshdDao
reload
in interface ReadableDao<ThreshdConfiguration>
reload
in class AbstractThreshdDao
Copyright © 2021. All rights reserved.