public class ScheduledResourcePropertiesBuilderDecorator extends AbstractResourcePropertiesBuilderDecorator<ResourceProperties.ResourcePropertiesBuilder> implements ScheduledResourceProperties.ScheduledResourcePropertiesBuilder
ScheduledResourcePropertiesBuilderDecorator
decorates
ResourceProperties.ResourcePropertiesBuilder
from which the properties are to be
reloaded periodically via AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
. Depending on the
invoked constructor, you can define whether orphan removal (see
AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
) is to be taken care of and the poll loop time,
e.g. in which time interval the properties are to be reloaded.ScheduledResourceProperties.ScheduledMuableResourceProperties, ScheduledResourceProperties.ScheduledResourcePropertiesBuilder
org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartable
org.refcodes.component.Stoppable.StopAutomaton, org.refcodes.component.Stoppable.StopBuilder<B extends org.refcodes.component.Stoppable.StopBuilder<B>>, org.refcodes.component.Stoppable.UncheckedStoppable
org.refcodes.mixin.Disposable.Disposedable
ResourceProperties.MutableResoureProperties, ResourceProperties.ResourcePropertiesBuilder
Properties.MutableProperties, Properties.PropertiesBuilder
org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
org.refcodes.structure.PathMap.MutablePathMap<T>, org.refcodes.structure.PathMap.PathMapBuilder<T>
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
org.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>
org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K,V,B extends org.refcodes.structure.Dictionary.MutableDictionary.DictionaryBuilder<K,V,B>>
_properties
DEFAULT_COMMENT
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
start() |
void |
stop() |
flush, loadFrom, loadFrom, reload, reload, saveTo, saveTo, seekFrom, toSerialized
clear, containsValue, entrySet, put, putAll, remove
childrenOf, containsKey, get, getDelimiter, isEmpty, keySet, retrieveFrom, retrieveTo, size, toDataStructure, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
withInsert, withInsert, withInsertFrom, withInsertTo, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withLoadFrom, withPut, withPut, withPutBoolean, withPutByte, withPutDouble, withPutFloat, withPutInteger, withPutLong, withPutShort, withRemoveFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom, withSeekFrom
withInsert, withInsert, withInsertFrom, withInsertTo
withInsert, withInsert, withInsertFrom, withInsertTo
withInsert, withInsert, withInsertFrom, withInsertTo
withPut
put, put, putBoolean, putBoolean, putByte, putByte, putDouble, putDouble, putFloat, putFloat, putInteger, putInteger, putLong, putLong, putShort, putShort
fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, flush, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, loadFrom, parseFrom, parseFrom, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, seekFrom, toSerialized, toSerialized
reload, reload
containsValue, delete, delete, insert, insert, insertFrom, insertTo, put, putAll, putAll, putAll
childrenOf, getDelimiter, getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPath
insert, insert, insertFrom, insertTo, putAll, toDump, toSourceCode, toSourceCode
toInstance, toInstance, toType, toType
containsKey, get, getBoolean, getBoolean, getByte, getByte, getCharacter, getCharacter, getDouble, getDouble, getFloat, getFloat, getInteger, getInteger, getLong, getLong, getShort, getShort, use, useBoolean, useBoolean, useByte, useByte, useDouble, useDouble, useFloat, useFloat, useInteger, useInteger, useLong, useLong, useShort, useShort
insert, insert, insert, insert, insertFrom, insertFrom, insertTo, insertTo, put, putArray, putArray, removeAll
directories, directories, entries, entries, fromExternalKey, getArray, getArray, getRootPath, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath
public ScheduledResourcePropertiesBuilderDecorator(ResourceProperties.ResourcePropertiesBuilder aProperties) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesBuilderDecorator
wrapping the given ResourceProperties.ResourcePropertiesBuilder
with default
settings being a poll loop time of 10 seconds (as of
PollLoopTime.NORM
and orphan removal (as of
AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
being called with true
).
The scheduling Thread
is started as daemon thread (see
ThreadMode.DAEMON
).
Immediately starts polling after construction of this instance for new
properties.aProperties
- The properties from which the properties are to be
reloaded periodically.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.public ScheduledResourcePropertiesBuilderDecorator(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeInMillis) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesBuilderDecorator
wrapping the given ResourceProperties.ResourcePropertiesBuilder
with setting the
given poll loop time and orphan removal (as of
AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
being called with true
).
The scheduling Thread
is started as daemon thread (see
ThreadMode.DAEMON
).
Immediately starts polling after construction of this instance for new
properties.aProperties
- The properties from which the properties are to be
reloaded periodically.aScheduleTimeInMillis
- The time in milliseconds between polling for
new properties.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.public ScheduledResourcePropertiesBuilderDecorator(ResourceProperties.ResourcePropertiesBuilder aProperties, ReloadMode aReloadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesBuilderDecorator
wrapping the given ResourceProperties.ResourcePropertiesBuilder
with setting the the
default poll loop time of 10 seconds (as of PollLoopTime.NORM
and
the given orphan removal strategy (as of AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
being called with your argument).
The scheduling Thread
is started as daemon thread (see
ThreadMode.DAEMON
).
Immediately starts polling after construction of this instance for new
properties.aProperties
- The properties from which the properties are to be
reloaded periodically.aReloadMode
- when set to ReloadMode.ORPHAN_REMOVAL
, then
properties existing in the attached resource but not(!) in the
Properties
itself are(!) removed. Else properties not
existing in the attached resource are kept.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.public ScheduledResourcePropertiesBuilderDecorator(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeInMillis, ReloadMode aReloadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesBuilderDecorator
wrapping the given ResourceProperties.ResourcePropertiesBuilder
with setting the
given poll loop time and the given orphan removal strategy (as of
AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
being called with your argument).
The scheduling Thread
is started as daemon thread (see
ThreadMode.DAEMON
).
Immediately starts polling after construction of this instance for new
properties.aProperties
- The properties from which the properties are to be
reloaded periodically.aScheduleTimeInMillis
- The time in milliseconds between polling for
new properties.aReloadMode
- when set to ReloadMode.ORPHAN_REMOVAL
, then
properties existing in the attached resource but not(!) in the
Properties
itself are(!) removed. Else properties not
existing in the attached resource are kept.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.public ScheduledResourcePropertiesBuilderDecorator(ResourceProperties.ResourcePropertiesBuilder aProperties, org.refcodes.mixin.ThreadMode aThreadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesBuilderDecorator
wrapping the given ResourceProperties.ResourcePropertiesBuilder
with default
settings being a poll loop time of 10 seconds (as of
PollLoopTime.NORM
and orphan removal (as of
AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
being called with true
).
Immediately starts polling after construction of this instance for new
properties.aProperties
- The properties from which the properties are to be
reloaded periodically.aThreadMode
- The ThreadMode
mode of operation regarding the
Thread
doing the scheduling job.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.public ScheduledResourcePropertiesBuilderDecorator(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeInMillis, org.refcodes.mixin.ThreadMode aThreadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesBuilderDecorator
wrapping the given ResourceProperties.ResourcePropertiesBuilder
with setting the
given poll loop time and orphan removal (as of
AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
being called with true
).
Immediately starts polling after construction of this instance for new
properties.aProperties
- The properties from which the properties are to be
reloaded periodically.aScheduleTimeInMillis
- The time in milliseconds between polling for
new properties.aThreadMode
- The ThreadMode
mode of operation regarding the
Thread
doing the scheduling job.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.public ScheduledResourcePropertiesBuilderDecorator(ResourceProperties.ResourcePropertiesBuilder aProperties, ReloadMode aReloadMode, org.refcodes.mixin.ThreadMode aThreadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesBuilderDecorator
wrapping the given ResourceProperties.ResourcePropertiesBuilder
with setting the the
default poll loop time of 10 seconds (as of PollLoopTime.NORM
and
the given orphan removal strategy (as of AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
being called with your argument).
Immediately starts polling after construction of this instance for new
properties.aProperties
- The properties from which the properties are to be
reloaded periodically.aReloadMode
- when set to ReloadMode.ORPHAN_REMOVAL
, then
properties existing in the attached resource but not(!) in the
Properties
itself are(!) removed. Else properties not
existing in the attached resource are kept.aThreadMode
- The ThreadMode
mode of operation regarding the
Thread
doing the scheduling job.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.public ScheduledResourcePropertiesBuilderDecorator(ResourceProperties.ResourcePropertiesBuilder aProperties, int aScheduleTimeInMillis, ReloadMode aReloadMode, org.refcodes.mixin.ThreadMode aThreadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesBuilderDecorator
wrapping the given ResourceProperties.ResourcePropertiesBuilder
with setting the
given poll loop time and the given orphan removal strategy (as of
AbstractResourcePropertiesBuilderDecorator.reload(ReloadMode)
being called with your argument).
Immediately starts polling after construction of this instance for new
properties.aProperties
- The properties from which the properties are to be
reloaded periodically.aScheduleTimeInMillis
- The time in milliseconds between polling for
new properties.aReloadMode
- when set to ReloadMode.ORPHAN_REMOVAL
, then
properties existing in the attached resource but not(!) in the
Properties
itself are(!) removed. Else properties not
existing in the attached resource are kept.aThreadMode
- The ThreadMode
mode of operation regarding the
Thread
doing the scheduling job.IOException
- thrown in case accessing the resource encountered an
I/O problem.IllegalStateException
- in case the attached resource does not
support reloading.ParseException
- Signals that an error has been reached
unexpectedly while parsing the data to be loaded.public void start() throws org.refcodes.component.StartException
start
in interface org.refcodes.component.Startable
org.refcodes.component.StartException
public void stop() throws org.refcodes.component.StopException
stop
in interface org.refcodes.component.Stoppable
org.refcodes.component.StopException
public void dispose()
dispose
in interface org.refcodes.mixin.Disposable
Copyright © 2018. All rights reserved.