io.aws.lambda.events.dynamodb.DynamodbTimeWindowEvent Maven / Gradle / Ivy
package io.aws.lambda.events.dynamodb;
import io.aws.lambda.events.TimeWindow;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jetbrains.annotations.NotNull;
import java.io.Serializable;
import java.util.Collections;
import java.util.Map;
/**
* Represents an Amazon Dynamodb event when using time
* windows.
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class DynamodbTimeWindowEvent extends DynamodbEvent implements Serializable {
/**
* Time window for the records in the event.
*/
private TimeWindow window;
/**
* State being built up to this invoke in the time window.
*/
private Map state;
/**
* Shard id of the records
*/
private String shardId;
/**
* Dynamodb stream arn.
*/
private String eventSourceArn;
/**
* Set to true for the last invoke of the time window. Subsequent invoke will
* start a new time window along with a fresh state.
*/
private Boolean isFinalInvokeForWindow;
/**
* Set to true if window is terminated prematurely. Subsequent invoke will
* continue the same window with a fresh state.
*/
private Boolean isWindowTerminatedEarly;
public @NotNull Map getState() {
return state == null ? Collections.emptyMap() : state;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy