public class RecordAdapter extends Record
This class is designed to be used in a single thread only.
| Modifier and Type | Field and Description |
|---|---|
static java.nio.charset.Charset |
defaultCharset |
| Constructor and Description |
|---|
RecordAdapter(Record record)
Constructs a new record using a DynamoDBStreams object.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Date |
getApproximateArrivalTimestamp() |
java.nio.ByteBuffer |
getData()
This method returns JSON serialized
Record object. |
Record |
getInternalObject() |
java.lang.String |
getPartitionKey()
Jackson ObjectMapper requires a valid return value for serialization.
|
java.lang.String |
getSequenceNumber() |
void |
setApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp) |
void |
setData(java.nio.ByteBuffer data) |
void |
setPartitionKey(java.lang.String partitionKey) |
void |
setSequenceNumber(java.lang.String sequenceNumber) |
Record |
withApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp) |
Record |
withData(java.nio.ByteBuffer data) |
Record |
withPartitionKey(java.lang.String partitionKey) |
Record |
withSequenceNumber(java.lang.String sequenceNumber) |
public RecordAdapter(Record record)
record - Instance of DynamoDBStreams Recordpublic Record getInternalObject()
public java.lang.String getSequenceNumber()
getSequenceNumber in class Recordpublic void setSequenceNumber(java.lang.String sequenceNumber)
setSequenceNumber in class Recordpublic Record withSequenceNumber(java.lang.String sequenceNumber)
withSequenceNumber in class Recordpublic java.nio.ByteBuffer getData()
Record object. However, This is not the best to use the object
It is recommended to get an object using getInternalObject() and cast appropriately.public java.lang.String getPartitionKey()
getPartitionKey in class Recordpublic void setPartitionKey(java.lang.String partitionKey)
setPartitionKey in class Recordpublic Record withPartitionKey(java.lang.String partitionKey)
withPartitionKey in class Recordpublic java.util.Date getApproximateArrivalTimestamp()
getApproximateArrivalTimestamp in class Recordpublic void setApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp)
setApproximateArrivalTimestamp in class Recordpublic Record withApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp)
withApproximateArrivalTimestamp in class Record