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.ScheduledResourcePropertiesBuilder
ResourceProperties.MutableResoureProperties, ResourceProperties.ResourcePropertiesBuilder
Properties.MutableProperties, Properties.PropertiesBuilder
org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
org.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.DelimiterProperty
org.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.PropertiesMutatorMixin
org.refcodes.component.Startable.StartAutomaton, org.refcodes.component.Startable.StartBuilder<B extends org.refcodes.component.Startable.StartBuilder<B>>, org.refcodes.component.Startable.UncheckedStartable
_properties
DEFAULT_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
childrenOf, containsKey, get, getDelimiter, isEmpty, keySet, retrieveFrom, retrieveTo, size, toDataStructure, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
reload, reload
childrenOf, containsValue, getDelimiter, getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPath
toInstance, toInstance, toType, toType
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
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
public 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.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.