Module io.inverno.mod.configuration
Package io.inverno.mod.configuration
Class AbstractConfigurableConfigurationSource<A extends ConfigurationQuery<A,B>,B extends ExecutableConfigurationQuery<A,B>,C extends ListConfigurationQuery<C>,D extends ConfigurationUpdate<D,E>,E extends ExecutableConfigurationUpdate<D,E>,F>
java.lang.Object
io.inverno.mod.configuration.AbstractConfigurationSource<A,B,C,F>
io.inverno.mod.configuration.AbstractConfigurableConfigurationSource<A,B,C,D,E,F>
- Type Parameters:
A
- source specific query typeB
- source specific executable query typeC
- source specific list query typeD
- source specific update typeE
- source specific executable update typeF
- raw configuration value type
- All Implemented Interfaces:
ConfigurableConfigurationSource<A,
,B, C, D, E> ConfigurationSource<A,
B, C>
- Direct Known Subclasses:
RedisConfigurationSource
,VersionedRedisConfigurationSource
public abstract class AbstractConfigurableConfigurationSource<A extends ConfigurationQuery<A,B>,B extends ExecutableConfigurationQuery<A,B>,C extends ListConfigurationQuery<C>,D extends ConfigurationUpdate<D,E>,E extends ExecutableConfigurationUpdate<D,E>,F>
extends AbstractConfigurationSource<A,B,C,F>
implements ConfigurableConfigurationSource<A,B,C,D,E>
Base implementation for ConfigurableConfigurationSource
.
Implementors must rely on the encoder and decoder provided in this implementation to respectively store and retrieve configuration values in/from the configuration source.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected JoinablePrimitiveEncoder
<F> The data encoder to use to encode configuration data into the data source.Fields inherited from class io.inverno.mod.configuration.AbstractConfigurationSource
decoder
-
Constructor Summary
ConstructorDescriptionAbstractConfigurableConfigurationSource
(JoinablePrimitiveEncoder<F> encoder, SplittablePrimitiveDecoder<F> decoder) Creates a configurable configuration source with the specified encoder and decoder. -
Method Summary
Modifier and TypeMethodDescriptionReturns the configuration value encoder.void
setEncoder
(JoinablePrimitiveEncoder<F> encoder) Sets the configuration value encoder.Methods inherited from class io.inverno.mod.configuration.AbstractConfigurationSource
getDecoder, setDecoder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.inverno.mod.configuration.ConfigurableConfigurationSource
set, set, set, set, set, set, set, set, set, set, set
Methods inherited from interface io.inverno.mod.configuration.ConfigurationSource
get, list
-
Field Details
-
encoder
The data encoder to use to encode configuration data into the data source.
-
-
Constructor Details
-
AbstractConfigurableConfigurationSource
public AbstractConfigurableConfigurationSource(JoinablePrimitiveEncoder<F> encoder, SplittablePrimitiveDecoder<F> decoder) Creates a configurable configuration source with the specified encoder and decoder.
- Parameters:
encoder
- a joinable primitive encoderdecoder
- a splittable primitive decoder- Throws:
NullPointerException
- if one of the specified decoder or encoder is null
-
-
Method Details
-
getEncoder
Returns the configuration value encoder.
- Returns:
- a joinable primitive encoder
-
setEncoder
Sets the configuration value encoder.
- Parameters:
encoder
- a joinable primitive encoder- Throws:
NullPointerException
- if the specified encoder is null
-