Interface PropertyDefinition

All Known Implementing Classes:
SimplePropertyDefinition

public interface PropertyDefinition
This interface describes an extended approach of the currently available pure property based configuration inside Hazelcast and helps implementing an automatic and transparent way to verify configuration as well as converting types based on provided validators and converters.

All verification is done on property level which means that the configuration overall might still be invalid and needs to be checked by the provider vendor before actually using it.

All used TypeConverters and ValueValidators need to be fully thread-safe and are recommended to be stateless to prevent any kind of unexpected concurrency issues.

  • Method Summary

    Modifier and Type Method Description
    String key()
    Returns the key (the name) of this property inside the configuration.
    boolean optional()
    Defines if this property is optional or not.
    TypeConverter typeConverter()
    The TypeConverter to be used to convert the string value read from XML to the expected type automatically.
    ValueValidator validator()
    Returns an optional validator to validate a value before finalizing the configuration.
  • Method Details

    • typeConverter

      TypeConverter typeConverter()
      The TypeConverter to be used to convert the string value read from XML to the expected type automatically.
      Returns:
      a defined type converter to convert from string to another type
    • key

      String key()
      Returns the key (the name) of this property inside the configuration.
      Returns:
      returns the property key
    • validator

      ValueValidator validator()
      Returns an optional validator to validate a value before finalizing the configuration.
      Returns:
      the optional validator. Is allowed to be null in case there is no validation required.
    • optional

      boolean optional()
      Defines if this property is optional or not. Optional properties don't have to be set inside the configuration but if set they need to pass a possibly defined ValueValidator test.
      Returns:
      true if this property is optional, false otherwise