public class UtilSettings extends Object
Modifier and Type | Method and Description |
---|---|
static ISettingsMap |
getCredentials(ISettingsMap settings)
Get username and password, or token and token_type in a reporter configuration.
|
static long |
parseByteSize(String size) |
static Duration |
parseOffsetString(String offsetString)
Parse a string to return a duration.
|
public static Duration parseOffsetString(String offsetString)
Examples: - "1s" will return an object representing 1 second - "2minutes" will return an object representing 2 minutes
offsetString
- offset string to parsepublic static long parseByteSize(String size)
size
- a string using 'k', 'm' or 'g' or 't' toeasily set a size in bytes.public static ISettingsMap getCredentials(ISettingsMap settings)
settings
- reporter settingsCopyright © 2014–2023. All rights reserved.