Class Time
- java.lang.Object
-
- org.apache.flink.streaming.api.windowing.time.Time
-
@Deprecated @Public public final class Time extends Object
Deprecated.UseDurationThe definition of a time interval for windowing. The time characteristic referred to is the default time characteristic set on the execution environment.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Timedays(long days)Deprecated.Creates a newTimethat represents the given number of days.longgetSize()Deprecated.Gets the length of this policy's time interval.TimeUnitgetUnit()Deprecated.Gets the time unit for this policy's time interval.static Timehours(long hours)Deprecated.Creates a newTimethat represents the given number of hours.static Timemilliseconds(long milliseconds)Deprecated.Creates a newTimethat represents the given number of milliseconds.static Timeminutes(long minutes)Deprecated.Creates a newTimethat represents the given number of minutes.static Timeof(long size, TimeUnit unit)Deprecated.static Timeof(java.time.Duration duration)Deprecated.static Timeseconds(long seconds)Deprecated.Creates a newTimethat represents the given number of seconds.java.time.DurationtoDuration()Deprecated.static java.time.DurationtoDuration(Time time)Deprecated.longtoMilliseconds()Deprecated.Converts the time interval to milliseconds.
-
-
-
Method Detail
-
getUnit
public TimeUnit getUnit()
Deprecated.Gets the time unit for this policy's time interval.- Returns:
- The time unit for this policy's time interval.
-
getSize
public long getSize()
Deprecated.Gets the length of this policy's time interval.- Returns:
- The length of this policy's time interval.
-
toMilliseconds
public long toMilliseconds()
Deprecated.Converts the time interval to milliseconds.- Returns:
- The time interval in milliseconds.
-
toDuration
public java.time.Duration toDuration()
Deprecated.
-
of
public static Time of(long size, TimeUnit unit)
Deprecated.Creates a newTimeof the given duration andTimeUnit.The
Timerefers to the time characteristic that is set on the dataflow viaStreamExecutionEnvironment.setStreamTimeCharacteristic(org.apache.flink.streaming.api.TimeCharacteristic).- Parameters:
size- The duration of time.unit- The unit of time of the duration, for exampleTimeUnit.SECONDS.- Returns:
- The time policy.
-
milliseconds
public static Time milliseconds(long milliseconds)
Deprecated.Creates a newTimethat represents the given number of milliseconds.
-
seconds
public static Time seconds(long seconds)
Deprecated.Creates a newTimethat represents the given number of seconds.
-
minutes
public static Time minutes(long minutes)
Deprecated.Creates a newTimethat represents the given number of minutes.
-
hours
public static Time hours(long hours)
Deprecated.Creates a newTimethat represents the given number of hours.
-
-