Package no.unit.nva.events.models
Class ScanDatabaseRequest
java.lang.Object
no.unit.nva.events.models.ScanDatabaseRequest
- All Implemented Interfaces:
no.unit.nva.commons.json.JsonSerializable,EventBody
public class ScanDatabaseRequest
extends Object
implements EventBody, no.unit.nva.commons.json.JsonSerializable
Class that can be sent as an event to a lambda handler for scanning a page of a DynamoDB table. The
startMarker is a scan start marker as required by the DynamoDb client. The pageSize is the number of the
results the scan will return (max 1000). The topic is the event topic that the handler is listening for
events.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScanDatabaseRequest(String topic, Integer pageSize, Map<String, com.amazonaws.services.dynamodbv2.model.AttributeValue> startMarker) -
Method Summary
Modifier and TypeMethodDescriptionsoftware.amazon.awssdk.services.eventbridge.model.PutEventsRequestEntrycreateNewEventEntry(String eventBusName, String detailType, String invokedFunctionArn) booleanstatic ScanDatabaseRequestintgetTopic()inthashCode()newScanDatabaseRequest(Map<String, com.amazonaws.services.dynamodbv2.model.AttributeValue> newStartMarker) Utility method for creating easily the next scan request.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface no.unit.nva.commons.json.JsonSerializable
toJsonString
-
Field Details
-
START_MARKER
- See Also:
-
PAGE_SIZE
- See Also:
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE- See Also:
-
MAX_PAGE_SIZE
public static final int MAX_PAGE_SIZE- See Also:
-
-
Constructor Details
-
ScanDatabaseRequest
-
-
Method Details
-
fromJson
public static ScanDatabaseRequest fromJson(String detail) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getTopic
-
getPageSize
public int getPageSize() -
getStartMarker
-
newScanDatabaseRequest
public ScanDatabaseRequest newScanDatabaseRequest(Map<String, com.amazonaws.services.dynamodbv2.model.AttributeValue> newStartMarker) Utility method for creating easily the next scan request.- Parameters:
newStartMarker- the start marker for the next scan operation.- Returns:
- a new ScanDatabaseRequest containing the the
newStartMarker
-
createNewEventEntry
-
hashCode
public int hashCode() -
equals
-