Package org.forgerock.opendj.config
Class SizePropertyDefinition.Builder
- java.lang.Object
-
- org.forgerock.opendj.config.PropertyDefinition.AbstractBuilder<Long,SizePropertyDefinition>
-
- org.forgerock.opendj.config.SizePropertyDefinition.Builder
-
- Enclosing class:
- SizePropertyDefinition
public static final class SizePropertyDefinition.Builder extends PropertyDefinition.AbstractBuilder<Long,SizePropertyDefinition>
An interface for incrementally constructing memory size property definitions.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SizePropertyDefinitionbuildInstance(AbstractManagedObjectDefinition<?,?> d, String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction, DefaultBehaviorProvider<ValueOrExpression<Long>> defaultBehavior)Build a property definition based on the properties of this builder.voidsetAllowUnlimited(boolean allowUnlimited)Specify whether this property definition will allow unlimited values (default is false).voidsetLowerLimit(long lowerLimit)Set the lower limit in bytes.voidsetLowerLimit(String lowerLimit)Set the lower limit using a string representation of the limit.voidsetUpperLimit(Long upperLimit)Set the upper limit in bytes.voidsetUpperLimit(String upperLimit)Set the upper limit using a string representation of the limit.-
Methods inherited from class org.forgerock.opendj.config.PropertyDefinition.AbstractBuilder
getInstance, setAdministratorAction, setDefaultBehaviorProvider, setOption
-
-
-
-
Method Detail
-
setLowerLimit
public void setLowerLimit(long lowerLimit)
Set the lower limit in bytes.- Parameters:
lowerLimit- The new lower limit (must be>= 0) in bytes.- Throws:
IllegalArgumentException- If a negative lower limit was specified, or if the lower limit is greater than the upper limit.
-
setLowerLimit
public void setLowerLimit(String lowerLimit)
Set the lower limit using a string representation of the limit.- Parameters:
lowerLimit- The string representation of the new lower limit.- Throws:
IllegalArgumentException- If the lower limit could not be parsed, or if a negative lower limit was specified, or the lower limit is greater than the upper limit.
-
setUpperLimit
public void setUpperLimit(Long upperLimit)
Set the upper limit in bytes.- Parameters:
upperLimit- The new upper limit in bytes ornullif there is no upper limit.- Throws:
IllegalArgumentException- If the lower limit is greater than the upper limit.
-
setUpperLimit
public void setUpperLimit(String upperLimit)
Set the upper limit using a string representation of the limit.- Parameters:
upperLimit- The string representation of the new upper limit, ornullif there is no upper limit.- Throws:
IllegalArgumentException- If the upper limit could not be parsed, or if the lower limit is greater than the upper limit.
-
setAllowUnlimited
public void setAllowUnlimited(boolean allowUnlimited)
Specify whether this property definition will allow unlimited values (default is false).- Parameters:
allowUnlimited-trueif the property will allow unlimited values, orfalseotherwise.
-
buildInstance
protected SizePropertyDefinition buildInstance(AbstractManagedObjectDefinition<?,?> d, String propertyName, EnumSet<PropertyOption> options, AdministratorAction adminAction, DefaultBehaviorProvider<ValueOrExpression<Long>> defaultBehavior)
Description copied from class:PropertyDefinition.AbstractBuilderBuild a property definition based on the properties of this builder.- Specified by:
buildInstancein classPropertyDefinition.AbstractBuilder<Long,SizePropertyDefinition>- Parameters:
d- The managed object definition associated with this property definition.propertyName- The property name.options- Options applicable to this definition.adminAction- The administrator action.defaultBehavior- The default behavior provider.- Returns:
- The new property definition.
-
-