DATA - The data type which is handled by the time stamp used in the
policy represented by this helperpublic class Time<DATA> extends WindowingHelper<DATA>
System.currentTimeMillis() in
SystemTimestamp.| Modifier and Type | Field and Description |
|---|---|
protected long |
delay |
protected TimeUnit |
granularity |
protected long |
length |
protected TimestampWrapper<DATA> |
timestampWrapper |
executionConfig| Modifier and Type | Method and Description |
|---|---|
protected long |
granularityInMillis() |
static <DATA> Time<DATA> |
of(long length,
Timestamp<DATA> timestamp)
Creates a helper representing a time trigger which triggers every given
length (slide size) or a time eviction which evicts all elements older
than length (window size) using a user defined timestamp extractor.
|
static <DATA> Time<DATA> |
of(long length,
Timestamp<DATA> timestamp,
long startTime)
Creates a helper representing a time trigger which triggers every given
length (slide size) or a time eviction which evicts all elements older
than length (window size) using a user defined timestamp extractor.
|
static <DATA> Time<DATA> |
of(long length,
TimeUnit timeUnit)
Creates a helper representing a time trigger which triggers every given
length (slide size) or a time eviction which evicts all elements older
than length (window size) using System time.
|
EvictionPolicy<DATA> |
toEvict()
Method for encapsulating the
EvictionPolicy. |
TriggerPolicy<DATA> |
toTrigger()
Method for encapsulating the
TriggerPolicy. |
setExecutionConfigprotected long length
protected TimeUnit granularity
protected TimestampWrapper<DATA> timestampWrapper
protected long delay
public EvictionPolicy<DATA> toEvict()
WindowingHelperEvictionPolicy.toEvict in class WindowingHelper<DATA>public TriggerPolicy<DATA> toTrigger()
WindowingHelperTriggerPolicy.toTrigger in class WindowingHelper<DATA>public static <DATA> Time<DATA> of(long length, TimeUnit timeUnit)
length - The number of time unitstimeUnit - The unit of time such as minute oder millisecond. Note that
the smallest possible granularity is milliseconds. Any smaller
time unit might cause an error at runtime due to conversion
problems.public static <DATA> Time<DATA> of(long length, Timestamp<DATA> timestamp, long startTime)
length - The number of time unitstimestamp - The user defined timestamp that will be used to extract time
information from the incoming elementsstartTime - The startTime used to compute the first windowpublic static <DATA> Time<DATA> of(long length, Timestamp<DATA> timestamp)
length - The number of time unitstimestamp - The user defined timestamp that will be used to extract time
information from the incoming elementsprotected long granularityInMillis()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.