public interface KinesisPartitioner<T>
extends java.io.Serializable
| Modifier and Type | Interface and Description | 
|---|---|
| static interface  | KinesisPartitioner.ExplicitPartitioner<T>An explicit partitioner that always returns a  Nonnullexplicit hash key. | 
| Modifier and Type | Field and Description | 
|---|---|
| static java.math.BigInteger | MAX_HASH_KEY | 
| static java.math.BigInteger | MIN_HASH_KEY | 
| Modifier and Type | Method and Description | 
|---|---|
| static <T> KinesisPartitioner<T> | explicitRandomPartitioner(int shards)Explicit hash key partitioner that randomly returns one of x precalculated hash keys. | 
| default java.lang.String | getExplicitHashKey(T record)Optional hash value (128-bit integer) to determine explicitly the shard a record is assigned to
 based on the hash key range of each shard. | 
| java.lang.String | getPartitionKey(T record)Determines which shard in the stream the record is assigned to. | 
static final java.math.BigInteger MIN_HASH_KEY
static final java.math.BigInteger MAX_HASH_KEY
@Nonnull java.lang.String getPartitionKey(T record)
@Nullable default java.lang.String getExplicitHashKey(T record)
static <T> KinesisPartitioner<T> explicitRandomPartitioner(int shards)
Note: This simple approach is likely not applicable anymore after resharding a stream. In that case it is recommended to use the ListShards API to retrieve the actual hash key range of each shard and partition based on that.