Interface NBConfigModel

All Known Implementing Classes:
ConfigModel

public interface NBConfigModel

This configuration model describes what is valid to submit for configuration for a given configurable object. Once this is provided by a configurable element, it is used internally by NoSQLBench to ensure that only valid configuration are given to newly built objects.

It is conventional to put the config model at the bottom of any implementing class for quick reference.

  • Method Summary

    Modifier and Type Method Description
    NBConfigModel add​(NBConfigModel otherModel)  
    NBConfiguration apply​(java.util.Map<java.lang.String,​?> config)  
    void assertValidConfig​(java.util.Map<java.lang.String,​?> config)  
    NBConfiguration extractConfig​(NBConfiguration cfg)
    Extract the fields from the shared config into a separate config, removing those that are defined in this model and leaving extraneous config fields in the provided model.
    NBConfiguration extractConfig​(java.util.Map<java.lang.String,​?> sharedConfig)
    Extract the fields from the shared config into a separate config, removing those that are defined in this model and leaving extraneous config fields in the provided model.
    java.util.Map<java.lang.String,​Param<?>> getNamedParams()  
    java.lang.Class<?> getOf()  
    <V> Param<V> getParam​(java.lang.String... name)  
    java.util.List<Param<?>> getParams()  
  • Method Details

    • getNamedParams

      java.util.Map<java.lang.String,​Param<?>> getNamedParams()
    • getParams

      java.util.List<Param<?>> getParams()
    • getOf

      java.lang.Class<?> getOf()
    • assertValidConfig

      void assertValidConfig​(java.util.Map<java.lang.String,​?> config)
    • apply

      NBConfiguration apply​(java.util.Map<java.lang.String,​?> config)
    • getParam

      <V> Param<V> getParam​(java.lang.String... name)
    • extractConfig

      NBConfiguration extractConfig​(java.util.Map<java.lang.String,​?> sharedConfig)
      Extract the fields from the shared config into a separate config, removing those that are defined in this model and leaving extraneous config fields in the provided model. This method mutates the map that is provided.
      Parameters:
      sharedConfig - A config map which can provide fields to multiple models
      Returns:
      A new configuration for the extracted fields only.
    • extractConfig

      NBConfiguration extractConfig​(NBConfiguration cfg)
      Extract the fields from the shared config into a separate config, removing those that are defined in this model and leaving extraneous config fields in the provided model. This method mutates the map that is provided.
      Parameters:
      cfg - A config map which can provide fields to multiple models
      Returns:
      A new configuration for the extracted fields only.
    • add

      NBConfigModel add​(NBConfigModel otherModel)