public static final class PropertyKey.Builder extends Object
PropertyKey
instances. Note that, Builder.build()
will
throw exception if there is an existing property built with the same name.Constructor and Description |
---|
Builder(PropertyKey.PropertyType type,
Optional<String> delimiter,
PropertyKey.Template template,
Object... params) |
Builder(PropertyKey.PropertyType type,
PropertyKey.Template template,
Object... params) |
Builder(PropertyKey.Template template,
Object... params) |
public Builder(PropertyKey.Template template, Object... params)
template
- template for the property nameparams
- parameters of the templatepublic Builder(PropertyKey.PropertyType type, PropertyKey.Template template, Object... params)
type
- type of the propertytemplate
- template for the property nameparams
- parameters of the templatepublic Builder(PropertyKey.PropertyType type, Optional<String> delimiter, PropertyKey.Template template, Object... params)
type
- type of the propertydelimiter
- delimiter for value, if list value is given as a stringtemplate
- template for the property nameparams
- parameters of the templatepublic static PropertyKey.Builder booleanBuilder(String name)
name
- name of the propertypublic static PropertyKey.Builder intBuilder(String name)
name
- name of the propertypublic static PropertyKey.Builder longBuilder(String name)
name
- name of the propertypublic static PropertyKey.Builder doubleBuilder(String name)
name
- name of the propertypublic static PropertyKey.Builder stringBuilder(String name)
name
- name of the propertypublic static PropertyKey.Builder enumBuilder(String name, Class<? extends Enum> enumType)
name
- name of the propertyenumType
- enum class of the propertypublic static PropertyKey.Builder durationBuilder(String name)
name
- name of the propertypublic static PropertyKey.Builder dataSizeBuilder(String name)
name
- name of the propertypublic static PropertyKey.Builder classBuilder(String name)
name
- name of the propertypublic static PropertyKey.Builder listBuilder(String name)
name
- name of the propertypublic PropertyKey.Builder setAlias(String... aliases)
aliases
- aliases for the propertypublic PropertyKey.Builder setName(String name)
name
- name for the propertypublic PropertyKey.Builder setDefaultSupplier(DefaultSupplier defaultSupplier)
defaultSupplier
- supplier for the property's default valuepublic PropertyKey.Builder setDefaultSupplier(java.util.function.Supplier<Object> supplier, String description)
supplier
- supplier for the property's default valuedescription
- description of the default valuepublic PropertyKey.Builder setDefaultValue(Object defaultValue)
defaultValue
- the property's default valuepublic PropertyKey.Builder setDescription(String description)
description
- of the propertypublic PropertyKey.Builder setIsBuiltIn(boolean isBuiltIn)
isBuiltIn
- whether to the property is a built-in Alluxio propertypublic PropertyKey.Builder setIsHidden(boolean isHidden)
isHidden
- whether to hide the property when generating property documentationpublic PropertyKey.Builder setIgnoredSiteProperty(boolean ignoredSiteProperty)
ignoredSiteProperty
- whether the property should be ignored in alluxio-site.propertiespublic PropertyKey.Builder setConsistencyCheckLevel(PropertyKey.ConsistencyCheckLevel consistencyCheckLevel)
consistencyCheckLevel
- the consistency level that applies to this propertypublic PropertyKey.Builder setScope(Scope scope)
scope
- which components this property applies topublic PropertyKey.Builder setDisplayType(PropertyKey.DisplayType displayType)
displayType
- the displayType that indicates how the property value should be displayedpublic PropertyKey.Builder setIsDynamic(boolean dynamic)
dynamic
- whether the property could be updated dynamicallypublic PropertyKey.Builder setValueValidationFunction(java.util.function.Function<Object,Boolean> valueValidationFunction)
valueValidationFunction
- custom function to validate the property valuepublic PropertyKey build()
public PropertyKey buildUnregistered()
Copyright © 2023. All Rights Reserved.