public class ScheduledResourcePropertiesDecorator extends AbstractResourcePropertiesDecorator<ResourceProperties> implements ScheduledResourceProperties
ScheduledResourcePropertiesDecorator decorates
ResourceProperties from which the properties are to be reloaded
periodically via AbstractResourcePropertiesDecorator.reload(ReloadMode). Depending on the invoked
constructor, you can define whether orphan removal (see
AbstractResourcePropertiesDecorator.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.ScheduledResourcePropertiesBuilderResourceProperties.MutableResoureProperties, ResourceProperties.ResourcePropertiesBuilderProperties.MutableProperties, Properties.PropertiesBuilderorg.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMaporg.refcodes.structure.PathMap.MutablePathMap<T>, org.refcodes.structure.PathMap.PathMapBuilder<T>org.refcodes.structure.Dictionary.MutableDictionary<K,V>org.refcodes.structure.Keys.MutableKeys<K,V>, org.refcodes.structure.Keys.MutableValues<K,V>org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterPropertyorg.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixinorg.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartable_propertiesDEFAULT_COMMENT| Constructor and Description |
|---|
ScheduledResourcePropertiesDecorator(ResourceProperties aProperties)
Constructs the
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with default settings being a poll loop
time of 10 seconds (as of PollLoopTime.NORM and orphan removal
(as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with true). |
ScheduledResourcePropertiesDecorator(ResourceProperties aProperties,
int aScheduleTimeInMillis)
Constructs the
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the given poll loop time
and orphan removal (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with
true). |
ScheduledResourcePropertiesDecorator(ResourceProperties aProperties,
int aScheduleTimeInMillis,
ReloadMode aReloadMode)
Constructs the
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the given poll loop time
and the given orphan removal strategy (as of AbstractResourcePropertiesDecorator.reload(ReloadMode)
being called with your argument). |
ScheduledResourcePropertiesDecorator(ResourceProperties aProperties,
int aScheduleTimeInMillis,
ReloadMode aReloadMode,
org.refcodes.mixin.ThreadMode aThreadMode)
Constructs the
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the given poll loop time
and the given orphan removal strategy (as of AbstractResourcePropertiesDecorator.reload(ReloadMode)
being called with your argument). |
ScheduledResourcePropertiesDecorator(ResourceProperties aProperties,
int aScheduleTimeInMillis,
org.refcodes.mixin.ThreadMode aThreadMode)
Constructs the
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the given poll loop time
and orphan removal (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with
true). |
ScheduledResourcePropertiesDecorator(ResourceProperties aProperties,
ReloadMode aReloadMode)
Constructs the
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the the default poll loop
time of 10 seconds (as of PollLoopTime.NORM and the given orphan
removal strategy (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with
your argument). |
ScheduledResourcePropertiesDecorator(ResourceProperties aProperties,
ReloadMode aReloadMode,
org.refcodes.mixin.ThreadMode aThreadMode)
Constructs the
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the the default poll loop
time of 10 seconds (as of PollLoopTime.NORM and the given orphan
removal strategy (as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with
your argument). |
ScheduledResourcePropertiesDecorator(ResourceProperties aProperties,
org.refcodes.mixin.ThreadMode aThreadMode)
Constructs the
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with default settings being a poll loop
time of 10 seconds (as of PollLoopTime.NORM and orphan removal
(as of AbstractResourcePropertiesDecorator.reload(ReloadMode) being called with true). |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
void |
start() |
void |
stop() |
reload, reload, saveTo, saveTochildrenOf, containsKey, get, getDelimiter, isEmpty, keySet, retrieveFrom, retrieveTo, size, toDataStructure, valuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfileTo, fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, fileTo, reload, reload, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, saveTo, toSerialized, toSerializedchildrenOf, containsValue, getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPathtoInstance, toInstance, toType, toTypedirectories, directories, entries, entries, fromExternalKey, getArray, getArray, hasParentPath, isArray, isArray, isDirectory, isEntry, isRecord, isRootPath, keySet, paths, paths, records, records, toDataStructure, toDataStructure, toExternalKey, toMap, toNormalizedPath, toNormalizedPath, toParentPath, toPath, toRootPathcontainsKey, 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, useShortpublic ScheduledResourcePropertiesDecorator(ResourceProperties aProperties) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with default settings being a poll loop
time of 10 seconds (as of PollLoopTime.NORM and orphan removal
(as of AbstractResourcePropertiesDecorator.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 ScheduledResourcePropertiesDecorator(ResourceProperties aProperties, int aScheduleTimeInMillis) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the given poll loop time
and orphan removal (as of AbstractResourcePropertiesDecorator.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 ScheduledResourcePropertiesDecorator(ResourceProperties aProperties, ReloadMode aReloadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the the default poll loop
time of 10 seconds (as of PollLoopTime.NORM and the given orphan
removal strategy (as of AbstractResourcePropertiesDecorator.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 ScheduledResourcePropertiesDecorator(ResourceProperties aProperties, int aScheduleTimeInMillis, ReloadMode aReloadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the given poll loop time
and the given orphan removal strategy (as of AbstractResourcePropertiesDecorator.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 ScheduledResourcePropertiesDecorator(ResourceProperties aProperties, org.refcodes.mixin.ThreadMode aThreadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with default settings being a poll loop
time of 10 seconds (as of PollLoopTime.NORM and orphan removal
(as of AbstractResourcePropertiesDecorator.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 ScheduledResourcePropertiesDecorator(ResourceProperties aProperties, int aScheduleTimeInMillis, org.refcodes.mixin.ThreadMode aThreadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the given poll loop time
and orphan removal (as of AbstractResourcePropertiesDecorator.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 ScheduledResourcePropertiesDecorator(ResourceProperties aProperties, ReloadMode aReloadMode, org.refcodes.mixin.ThreadMode aThreadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the the default poll loop
time of 10 seconds (as of PollLoopTime.NORM and the given orphan
removal strategy (as of AbstractResourcePropertiesDecorator.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 ScheduledResourcePropertiesDecorator(ResourceProperties aProperties, int aScheduleTimeInMillis, ReloadMode aReloadMode, org.refcodes.mixin.ThreadMode aThreadMode) throws IOException, ParseException, IllegalStateException
ScheduledResourcePropertiesDecorator wrapping the
given ResourceProperties with setting the given poll loop time
and the given orphan removal strategy (as of AbstractResourcePropertiesDecorator.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.Startableorg.refcodes.component.StartExceptionpublic void stop()
throws org.refcodes.component.StopException
stop in interface org.refcodes.component.Stoppableorg.refcodes.component.StopExceptionpublic void dispose()
dispose in interface org.refcodes.mixin.DisposableCopyright © 2018. All rights reserved.