public interface IDurationParser
A user application could implement this interface to provide customized time string parsing utility to rythm cache service. and then configure the Rythm to use customized implementation via "cache.duration_parser.impl" configuration.
Usually user application does not need to provide it’s own implementation, instead, the rythm built in time parser could be used as default implementation
| Modifier and Type | Field and Description |
|---|---|
static IDurationParser |
DEFAULT_PARSER
Rythm’s default implementation of
IDurationParser. |
| Modifier and Type | Method and Description |
|---|---|
int |
parseDuration(String s)
Parse a string representation and return number of seconds
|
static final IDurationParser DEFAULT_PARSER
Rythm’s default implementation of IDurationParser. It allows the following type of duration string representations:
int parseDuration(String s)
Parse a string representation and return number of seconds
s - Copyright © 2017–2021 OSGL (Open Source General Library). All rights reserved.