Package com.hazelcast.config.properties
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 to implement
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 TypeMethodDescriptionkey()Returns the key (the name) of this property inside the configuration.booleanoptional()Defines if this property is optional or not.TheTypeConverterto be used to convert the string value read from XML to the expected type automatically.Returns an optional validator to validate a value before finalizing the configuration.
-
Method Details
-
typeConverter
TypeConverter typeConverter()TheTypeConverterto 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
nullin 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 definedValueValidatortest.- Returns:
trueif this property is optional,falseotherwise
-