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 type
B - source specific executable query type
C - source specific list query type
D - source specific update type
E - source specific executable update type
F - 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 Details

    • encoder

      protected JoinablePrimitiveEncoder<F> 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 encoder
      decoder - a splittable primitive decoder
      Throws:
      NullPointerException - if one of the specified decoder or encoder is null
  • Method Details

    • getEncoder

      public JoinablePrimitiveEncoder<F> getEncoder()

      Returns the configuration value encoder.

      Returns:
      a joinable primitive encoder
    • setEncoder

      public void setEncoder(JoinablePrimitiveEncoder<F> encoder)

      Sets the configuration value encoder.

      Parameters:
      encoder - a joinable primitive encoder
      Throws:
      NullPointerException - if the specified encoder is null