public class Record extends Object implements Serializable
The unit of data of the Amazon Kinesis 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(Object obj) |
ByteBuffer |
getData()
The data blob.
|
String |
getPartitionKey()
Identifies which shard in the stream the data record is assigned to.
|
String |
getSequenceNumber()
The unique identifier for the record in the Amazon Kinesis stream.
|
int |
hashCode() |
void |
setData(ByteBuffer data)
The data blob.
|
void |
setPartitionKey(String partitionKey)
Identifies which shard in the stream the data record is assigned to.
|
void |
setSequenceNumber(String sequenceNumber)
The unique identifier for the record in the Amazon Kinesis stream.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Record |
withData(ByteBuffer data)
The data blob.
|
Record |
withPartitionKey(String partitionKey)
Identifies which shard in the stream the data record is assigned to.
|
Record |
withSequenceNumber(String sequenceNumber)
The unique identifier for the record in the Amazon Kinesis stream.
|
public String getSequenceNumber()
Constraints:
Pattern: 0|([1-9]\d{0,128})
public void setSequenceNumber(String sequenceNumber)
Constraints:
Pattern: 0|([1-9]\d{0,128})
sequenceNumber
- The unique identifier for the record in the Amazon Kinesis stream.public Record withSequenceNumber(String sequenceNumber)
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 for the record in the Amazon Kinesis stream.public ByteBuffer getData()
Constraints:
Length: 0 - 51200
public void setData(ByteBuffer data)
Constraints:
Length: 0 - 51200
data
- The data blob. The data in the blob is both opaque and immutable to
the Amazon Kinesis service, which does not inspect, interpret, or
change the data in the blob in any way. The maximum size of the data
blob (the payload after Base64-decoding) is 50 kilobytes (KB)public Record withData(ByteBuffer data)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 0 - 51200
data
- The data blob. The data in the blob is both opaque and immutable to
the Amazon Kinesis service, which does not inspect, interpret, or
change the data in the blob in any way. The maximum size of the data
blob (the payload after Base64-decoding) is 50 kilobytes (KB)public String getPartitionKey()
Constraints:
Length: 1 - 256
public void setPartitionKey(String partitionKey)
Constraints:
Length: 1 - 256
partitionKey
- Identifies which shard in the stream the data record is assigned to.public Record withPartitionKey(String partitionKey)
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 String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.