public class Record
extends java.lang.Object
implements java.io.Serializable
The unit of data of the Kinesis data stream, which is composed of a sequence number, a partition key, and a data blob.
Constructor and Description |
---|
Record() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Date |
getApproximateArrivalTimestamp()
The approximate time that the record was inserted into the stream.
|
java.nio.ByteBuffer |
getData()
The data blob.
|
java.lang.String |
getEncryptionType()
The encryption type used on the record.
|
java.lang.String |
getPartitionKey()
Identifies which shard in the stream the data record is assigned to.
|
java.lang.String |
getSequenceNumber()
The unique identifier of the record within its shard.
|
int |
hashCode() |
void |
setApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp)
The approximate time that the record was inserted into the stream.
|
void |
setData(java.nio.ByteBuffer data)
The data blob.
|
void |
setEncryptionType(EncryptionType encryptionType)
The encryption type used on the record.
|
void |
setEncryptionType(java.lang.String encryptionType)
The encryption type used on the record.
|
void |
setPartitionKey(java.lang.String partitionKey)
Identifies which shard in the stream the data record is assigned to.
|
void |
setSequenceNumber(java.lang.String sequenceNumber)
The unique identifier of the record within its shard.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Record |
withApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp)
The approximate time that the record was inserted into the stream.
|
Record |
withData(java.nio.ByteBuffer data)
The data blob.
|
Record |
withEncryptionType(EncryptionType encryptionType)
The encryption type used on the record.
|
Record |
withEncryptionType(java.lang.String encryptionType)
The encryption type used on the record.
|
Record |
withPartitionKey(java.lang.String partitionKey)
Identifies which shard in the stream the data record is assigned to.
|
Record |
withSequenceNumber(java.lang.String sequenceNumber)
The unique identifier of the record within its shard.
|
public java.lang.String getSequenceNumber()
The unique identifier of the record within its shard.
Constraints:
Pattern: 0|([1-9]\d{0,128})
The unique identifier of the record within its shard.
public void setSequenceNumber(java.lang.String sequenceNumber)
The unique identifier of the record within its shard.
Constraints:
Pattern: 0|([1-9]\d{0,128})
sequenceNumber
- The unique identifier of the record within its shard.
public Record withSequenceNumber(java.lang.String sequenceNumber)
The unique identifier of the record within its shard.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern: 0|([1-9]\d{0,128})
sequenceNumber
- The unique identifier of the record within its shard.
public java.util.Date getApproximateArrivalTimestamp()
The approximate time that the record was inserted into the stream.
The approximate time that the record was inserted into the stream.
public void setApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp)
The approximate time that the record was inserted into the stream.
approximateArrivalTimestamp
- The approximate time that the record was inserted into the stream.
public Record withApproximateArrivalTimestamp(java.util.Date approximateArrivalTimestamp)
The approximate time that the record was inserted into the stream.
Returns a reference to this object so that method calls can be chained together.
approximateArrivalTimestamp
- The approximate time that the record was inserted into the stream.
public java.nio.ByteBuffer getData()
The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).
Constraints:
Length: 0 - 1048576
The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).
public void setData(java.nio.ByteBuffer data)
The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).
Constraints:
Length: 0 - 1048576
data
- The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).
public Record withData(java.nio.ByteBuffer data)
The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 1048576
data
- The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).
public java.lang.String getPartitionKey()
Identifies which shard in the stream the data record is assigned to.
Constraints:
Length: 1 - 256
Identifies which shard in the stream the data record is assigned to.
public void setPartitionKey(java.lang.String partitionKey)
Identifies which shard in the stream the data record is assigned to.
Constraints:
Length: 1 - 256
partitionKey
- Identifies which shard in the stream the data record is assigned to.
public Record withPartitionKey(java.lang.String partitionKey)
Identifies which shard in the stream the data record is assigned to.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
partitionKey
- Identifies which shard in the stream the data record is assigned to.
public java.lang.String getEncryptionType()
The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in the stream
using a customer-managed AWS KMS key.
Constraints:
Allowed Values: NONE, KMS
The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in
the stream using a customer-managed AWS KMS key.
EncryptionType
public void setEncryptionType(java.lang.String encryptionType)
The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in the stream
using a customer-managed AWS KMS key.
Constraints:
Allowed Values: NONE, KMS
encryptionType
- The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in
the stream using a customer-managed AWS KMS key.
EncryptionType
public Record withEncryptionType(java.lang.String encryptionType)
The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in the stream
using a customer-managed AWS KMS key.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: NONE, KMS
encryptionType
- The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in
the stream using a customer-managed AWS KMS key.
EncryptionType
public void setEncryptionType(EncryptionType encryptionType)
The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in the stream
using a customer-managed AWS KMS key.
Constraints:
Allowed Values: NONE, KMS
encryptionType
- The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in
the stream using a customer-managed AWS KMS key.
EncryptionType
public Record withEncryptionType(EncryptionType encryptionType)
The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in the stream
using a customer-managed AWS KMS key.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: NONE, KMS
encryptionType
- The encryption type used on the record. This parameter can be one of the following values:
NONE
: Do not encrypt the records in the stream.
KMS
: Use server-side encryption on the records in
the stream using a customer-managed AWS KMS key.
EncryptionType
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.