Class PutRecordRequest
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
Represents the input for PutRecord
.
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a shallow clone of this request.boolean
getData()
The data blob to put into the record, which is base64-encoded when the blob is serialized.The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.Determines which shard in the stream the data record is assigned to.Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key.The name of the stream to put the data record into.int
hashCode()
void
setData
(ByteBuffer data) The data blob to put into the record, which is base64-encoded when the blob is serialized.void
setExplicitHashKey
(String explicitHashKey) The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.void
setPartitionKey
(String partitionKey) Determines which shard in the stream the data record is assigned to.void
setSequenceNumberForOrdering
(String sequenceNumberForOrdering) Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key.void
setStreamName
(String streamName) The name of the stream to put the data record into.toString()
Returns a string representation of this object; useful for testing and debugging.withData
(ByteBuffer data) The data blob to put into the record, which is base64-encoded when the blob is serialized.withExplicitHashKey
(String explicitHashKey) The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.withPartitionKey
(String partitionKey) Determines which shard in the stream the data record is assigned to.withSequenceNumberForOrdering
(String sequenceNumberForOrdering) Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key.withStreamName
(String streamName) The name of the stream to put the data record into.Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Constructor Details
-
PutRecordRequest
public PutRecordRequest()
-
-
Method Details
-
setStreamName
The name of the stream to put the data record into.
- Parameters:
streamName
- The name of the stream to put the data record into.
-
getStreamName
The name of the stream to put the data record into.
- Returns:
- The name of the stream to put the data record into.
-
withStreamName
The name of the stream to put the data record into.
- Parameters:
streamName
- The name of the stream to put the data record into.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setData
The data blob to put into the record, which is base64-encoded when the blob is serialized. 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).
AWS SDK for Java performs a Base64 encoding on this field before sending this request to AWS service by default. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
- Parameters:
data
- The data blob to put into the record, which is base64-encoded when the blob is serialized. 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).
-
getData
The data blob to put into the record, which is base64-encoded when the blob is serialized. 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).
ByteBuffer
s are stateful. Calling theirget
methods changes theirposition
. We recommend usingByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independentposition
, and callingget
methods on this rather than directly on the returnedByteBuffer
. Doing so will ensure that anyone else using theByteBuffer
will not be affected by changes to theposition
.- Returns:
- The data blob to put into the record, which is base64-encoded when the blob is serialized. 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).
-
withData
The data blob to put into the record, which is base64-encoded when the blob is serialized. 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).
- Parameters:
data
- The data blob to put into the record, which is base64-encoded when the blob is serialized. 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:
- Returns a reference to this object so that method calls can be chained together.
-
setPartitionKey
Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.
- Parameters:
partitionKey
- Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.
-
getPartitionKey
Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.
- Returns:
- Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.
-
withPartitionKey
Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.
- Parameters:
partitionKey
- Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setExplicitHashKey
The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.
- Parameters:
explicitHashKey
- The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.
-
getExplicitHashKey
The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.
- Returns:
- The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.
-
withExplicitHashKey
The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.
- Parameters:
explicitHashKey
- The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSequenceNumberForOrdering
Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key. Usage: set the
SequenceNumberForOrdering
of record n to the sequence number of record n-1 (as returned in the result when putting record n-1). If this parameter is not set, records will be coarsely ordered based on arrival time.- Parameters:
sequenceNumberForOrdering
- Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key. Usage: set theSequenceNumberForOrdering
of record n to the sequence number of record n-1 (as returned in the result when putting record n-1). If this parameter is not set, records will be coarsely ordered based on arrival time.
-
getSequenceNumberForOrdering
Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key. Usage: set the
SequenceNumberForOrdering
of record n to the sequence number of record n-1 (as returned in the result when putting record n-1). If this parameter is not set, records will be coarsely ordered based on arrival time.- Returns:
- Guarantees strictly increasing sequence numbers, for puts from
the same client and to the same partition key. Usage: set the
SequenceNumberForOrdering
of record n to the sequence number of record n-1 (as returned in the result when putting record n-1). If this parameter is not set, records will be coarsely ordered based on arrival time.
-
withSequenceNumberForOrdering
Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key. Usage: set the
SequenceNumberForOrdering
of record n to the sequence number of record n-1 (as returned in the result when putting record n-1). If this parameter is not set, records will be coarsely ordered based on arrival time.- Parameters:
sequenceNumberForOrdering
- Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key. Usage: set theSequenceNumberForOrdering
of record n to the sequence number of record n-1 (as returned in the result when putting record n-1). If this parameter is not set, records will be coarsely ordered based on arrival time.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
-