org.refcodes.component.Startable
, org.refcodes.component.Stoppable
, Properties
, ResourceProperties
, ScheduledResourceProperties
, org.refcodes.mixin.DelimiterAccessor
, org.refcodes.mixin.Disposable
, org.refcodes.mixin.Dumpable
, org.refcodes.mixin.TypeAccessor<String>
, org.refcodes.structure.CanonicalMap
, org.refcodes.structure.Containable
, org.refcodes.structure.Dictionary<String,T>
, org.refcodes.structure.Keys<String,T>
, org.refcodes.structure.PathMap<String>
, org.refcodes.structure.PropertiesAccessorMixin
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.org.refcodes.structure.CanonicalMap.CanonicalMapBuilder, org.refcodes.structure.CanonicalMap.MutableCanonicalMap
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.structure.Dictionary.MutableDictionary<K extends Object,V extends Object>
org.refcodes.mixin.Disposable.Disposedable
org.refcodes.structure.Keys.MutableKeys<K extends Object,V extends Object>, org.refcodes.structure.Keys.MutableValues<K extends Object,V extends Object>
org.refcodes.structure.PathMap.MutablePathMap<T extends Object>, org.refcodes.structure.PathMap.PathMapBuilder<T extends Object>
Properties.MutableProperties, Properties.PropertiesBuilder
org.refcodes.structure.PropertiesAccessorMixin.PropertiesBuilderMixin<T extends Object>, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMixin, org.refcodes.structure.PropertiesAccessorMixin.PropertiesMutatorMixin
ResourceProperties.MutableResoureProperties, ResourceProperties.ResourcePropertiesBuilder
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
DEFAULT_COMMENT
Constructor | 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.controlflow.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.controlflow.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.controlflow.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.controlflow.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 | Description |
---|---|---|
void |
dispose() |
|
void |
start() |
|
void |
stop() |
childrenOf, containsKey, get, getDelimiter, getProperties, isEmpty, keySet, retrieveFrom, retrieveTo, setProperties, size, toDataStructure, values
reload, reload
toInstance, toInstance, toType, toType
containsKey, get, get, keySet, use, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
childrenOf, containsValue, getDelimiter, getType, retrieve, retrieveFrom, retrieveTo, toMap, toProperties, toPropertyPath
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
reload, reload
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.controlflow.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.controlflow.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.controlflow.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.controlflow.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.