Class TumblingWindow
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<TumblingWindow.Builder,
TumblingWindow>
Contains a tumbling window, which is a repeating fixed-sized, non-overlapping, and contiguous time window. You can use this window in metrics to aggregate data from properties and other assets.
You can use m
, h
, d
, and w
when you specify an interval or
offset. Note that m
represents minutes, h
represents hours, d
represents days,
and w
represents weeks. You can also use s
to represent seconds in offset
.
The interval
and offset
parameters support the ISO 8601 format. For example, PT5S
represents 5
seconds, PT5M
represents 5 minutes, and PT5H
represents 5 hours.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic TumblingWindow.Builder
builder()
final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
final String
interval()
The time interval for the tumbling window.final String
offset()
The offset for the tumbling window.static Class
<? extends TumblingWindow.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
interval
The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.
IoT SiteWise computes the
1w
interval the end of Sunday at midnight each week (UTC), the1d
interval at the end of each day at midnight (UTC), the1h
interval at the end of each hour, and so on.When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.
- Returns:
- The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.
IoT SiteWise computes the
1w
interval the end of Sunday at midnight each week (UTC), the1d
interval at the end of each day at midnight (UTC), the1h
interval at the end of each hour, and so on.When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval.
-
offset
The offset for the tumbling window. The
offset
parameter accepts the following:-
The offset time.
For example, if you specify
18h
foroffset
and1d
forinterval
, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
-
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
-
-
The ISO 8601 format.
For example, if you specify
PT18H
foroffset
and1d
forinterval
, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
-
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
-
-
The 24-hour clock.
For example, if you specify
00:03:00
foroffset
,5m
forinterval
, and you create the metric at 2 PM (UTC), you get the first aggregation result at 2:03 PM (UTC). You get the second aggregation result at 2:08 PM (UTC). -
The offset time zone.
For example, if you specify
2021-07-23T18:00-08
foroffset
and1d
forinterval
, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (PST), you get the first aggregation result at 6 PM (PST) on the day when you create the metric.
-
If you create the metric after 6 PM (PST), you get the first aggregation result at 6 PM (PST) the next day.
-
- Returns:
- The offset for the tumbling window. The
offset
parameter accepts the following:-
The offset time.
For example, if you specify
18h
foroffset
and1d
forinterval
, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
-
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
-
-
The ISO 8601 format.
For example, if you specify
PT18H
foroffset
and1d
forinterval
, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) on the day when you create the metric.
-
If you create the metric after 6 PM (UTC), you get the first aggregation result at 6 PM (UTC) the next day.
-
-
The 24-hour clock.
For example, if you specify
00:03:00
foroffset
,5m
forinterval
, and you create the metric at 2 PM (UTC), you get the first aggregation result at 2:03 PM (UTC). You get the second aggregation result at 2:08 PM (UTC). -
The offset time zone.
For example, if you specify
2021-07-23T18:00-08
foroffset
and1d
forinterval
, IoT SiteWise aggregates data in one of the following ways:-
If you create the metric before or at 6 PM (PST), you get the first aggregation result at 6 PM (PST) on the day when you create the metric.
-
If you create the metric after 6 PM (PST), you get the first aggregation result at 6 PM (PST) the next day.
-
-
-
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<TumblingWindow.Builder,
TumblingWindow> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-