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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static BigInteger
KILO_BYTES
-
Constructor Summary
Constructors Constructor Description MemorySizeConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MemorySize
convert(String value)
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.
-
-
-
Field Detail
-
KILO_BYTES
static final BigInteger KILO_BYTES
-
-
Method Detail
-
convert
public MemorySize convert(String value)
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:
convert
in interfaceorg.eclipse.microprofile.config.spi.Converter<MemorySize>
- Parameters:
value
- - value to convert.- Returns:
MemorySize
- a memory size represented by the given value
-
-