Package io.quarkus.runtime.configuration
Class MemorySizeConverter
java.lang.Object
io.quarkus.runtime.configuration.MemorySizeConverter
- All Implemented Interfaces:
Serializable,org.eclipse.microprofile.config.spi.Converter<MemorySize>
@Priority(200)
public class MemorySizeConverter
extends Object
implements org.eclipse.microprofile.config.spi.Converter<MemorySize>, Serializable
A converter to support data sizes.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvert data size configuration value respecting the following format (shown in regular expression) "[0-9]+[BbKkMmGgTtPpEeZzYy]?" If the value contain no suffix, the size is treated as bytes.
-
Field Details
-
KILO_BYTES
-
-
Constructor Details
-
MemorySizeConverter
public MemorySizeConverter()
-
-
Method Details
-
convert
Convert data size configuration value respecting the following format (shown in regular expression) "[0-9]+[BbKkMmGgTtPpEeZzYy]?" If the value contain no suffix, the size is treated as bytes.- Specified by:
convertin interfaceorg.eclipse.microprofile.config.spi.Converter<MemorySize>- Parameters:
value- - value to convert.- Returns:
MemorySize- a memory size represented by the given value
-