Duration@Deprecated @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(Duration duration)
已过时。
|
static Time |
of(long size,
TimeUnit unit)
已过时。
|
static Time |
seconds(long seconds)
已过时。
Creates a new
Time that represents the given number of seconds. |
Duration |
toDuration()
已过时。
|
static Duration |
toDuration(Time time)
已过时。
|
long |
toMilliseconds()
已过时。
Converts the time interval to milliseconds.
|
public TimeUnit getUnit()
public long getSize()
public long toMilliseconds()
public Duration toDuration()
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–2024 The Apache Software Foundation. All rights reserved.