@Public public final class Time extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static Time |
days(long days)
Creates a new
Time that represents the given number of days. |
long |
getSize()
Gets the length of this policy's time interval.
|
TimeUnit |
getUnit()
Gets the time unit for this policy's time interval.
|
static Time |
hours(long hours)
Creates a new
Time that represents the given number of hours. |
static Time |
milliseconds(long milliseconds)
Creates a new
Time that represents the given number of milliseconds. |
static Time |
minutes(long minutes)
Creates a new
Time that represents the given number of minutes. |
static Time |
of(long size,
TimeUnit unit)
|
static Time |
seconds(long seconds)
Creates a new
Time that represents the given number of seconds. |
long |
toMilliseconds()
Converts the time interval to milliseconds.
|
public TimeUnit getUnit()
public long getSize()
public long toMilliseconds()
public static Time of(long size, TimeUnit unit)
Time of the given duration and TimeUnit.
The Time refers to the time characteristic that is set on the dataflow via
StreamExecutionEnvironment.setStreamTimeCharacteristic(org.apache.flink.streaming.api.TimeCharacteristic).
size - The duration of time.unit - The unit of time of the duration, for example TimeUnit.SECONDS.public static Time milliseconds(long milliseconds)
Time that represents the given number of milliseconds.public static Time seconds(long seconds)
Time that represents the given number of seconds.public static Time minutes(long minutes)
Time that represents the given number of minutes.public static Time hours(long hours)
Time that represents the given number of hours.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.