org.rythmengine.extension
Interface IDurationParser


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


Field Summary
static IDurationParser DEFAULT_PARSER
          Rythm's default implementation of IDurationParser.
 
Method Summary
 int parseDuration(String s)
          Parse a string representation and return number of seconds
 

Field Detail

DEFAULT_PARSER

static final IDurationParser DEFAULT_PARSER
Rythm's default implementation of IDurationParser. It allows the following type of duration string representations:

Method Detail

parseDuration

int parseDuration(String s)
Parse a string representation and return number of seconds

Parameters:
s -
Returns:
duration in seconds


Copyright © 2013. All Rights Reserved.