public class QueueCapacityConfigParser extends Object
QueueCapacityVector from the capacity
configuration property set for a queue.
A new syntax for capacity property could be implemented, by creating a parser
with a regex to match the pattern and a method that creates a
QueueCapacityVector from the matched pattern.
Extending the parsers field with a Parser object in the constructor
is needed in this case.
A new capacity type for the existing parsers could be added by extending
the QueueCapacityVector.QueueCapacityType with a new type and its
associated postfix symbol.| Modifier and Type | Field and Description |
|---|---|
static String |
FLOAT_DIGIT_REGEX |
| Constructor and Description |
|---|
QueueCapacityConfigParser() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isCapacityVectorFormat(String configuredCapacity)
Checks whether the given capacity string is in a capacity vector compatible
format.
|
QueueCapacityVector |
parse(String capacityString,
String queuePath)
Creates a
QueueCapacityVector parsed from the capacity configuration
property set for a queue. |
public static final String FLOAT_DIGIT_REGEX
public QueueCapacityVector parse(String capacityString, String queuePath)
QueueCapacityVector parsed from the capacity configuration
property set for a queue.capacityString - capacity string to parsequeuePath - queue for which the capacity property is parsedpublic boolean isCapacityVectorFormat(String configuredCapacity)
configuredCapacity - capacity stringCopyright © 2008–2024 Apache Software Foundation. All rights reserved.