public static class BaseWindowedBolt.Duration extends Object
Holds a Time duration for time based windows and sliding intervals.
Modifier and Type | Field and Description |
---|---|
int |
value |
Modifier and Type | Method and Description |
---|---|
static BaseWindowedBolt.Duration |
days(int days)
Returns a
BaseWindowedBolt.Duration corresponding to the the given value in days. |
static BaseWindowedBolt.Duration |
hours(int hours)
Returns a
BaseWindowedBolt.Duration corresponding to the the given value in hours. |
static BaseWindowedBolt.Duration |
minutes(int minutes)
Returns a
BaseWindowedBolt.Duration corresponding to the the given value in minutes. |
static BaseWindowedBolt.Duration |
of(int milliseconds)
Returns a
BaseWindowedBolt.Duration corresponding to the the given value in milli seconds. |
static BaseWindowedBolt.Duration |
seconds(int seconds)
Returns a
BaseWindowedBolt.Duration corresponding to the the given value in seconds. |
String |
toString() |
public Duration(int value, TimeUnit timeUnit)
public static BaseWindowedBolt.Duration of(int milliseconds)
Returns a BaseWindowedBolt.Duration
corresponding to the the given value in milli seconds.
milliseconds
- the duration in millisecondspublic static BaseWindowedBolt.Duration days(int days)
Returns a BaseWindowedBolt.Duration
corresponding to the the given value in days.
days
- the number of dayspublic static BaseWindowedBolt.Duration hours(int hours)
Returns a BaseWindowedBolt.Duration
corresponding to the the given value in hours.
hours
- the number of hourspublic static BaseWindowedBolt.Duration minutes(int minutes)
Returns a BaseWindowedBolt.Duration
corresponding to the the given value in minutes.
minutes
- the number of minutespublic static BaseWindowedBolt.Duration seconds(int seconds)
Returns a BaseWindowedBolt.Duration
corresponding to the the given value in seconds.
seconds
- the number of secondsCopyright © 2022 The Apache Software Foundation. All Rights Reserved.