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 Details

  • Constructor Details

    • MemorySizeConverter

      public MemorySizeConverter()
  • Method Details

    • 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 interface org.eclipse.microprofile.config.spi.Converter<MemorySize>
      Parameters:
      value - - value to convert.
      Returns:
      MemorySize - a memory size represented by the given value