public class KinesisClientLeaseManager extends LeaseManager<KinesisClientLease> implements IKinesisClientLeaseManager
consistentReads, dynamoDBClient, serializer, table| Constructor and Description |
|---|
KinesisClientLeaseManager(String table,
com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDBClient)
Deprecated.
|
KinesisClientLeaseManager(String table,
com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDBClient,
com.amazonaws.services.dynamodbv2.model.BillingMode billingMode)
Constructor.
|
KinesisClientLeaseManager(String table,
com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDBClient,
boolean consistentReads)
Deprecated.
|
KinesisClientLeaseManager(String table,
com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDBClient,
boolean consistentReads,
com.amazonaws.services.dynamodbv2.model.BillingMode billingMode)
Constructor for integration tests - see comment on superclass for documentation on setting the consistentReads
flag.
|
| Modifier and Type | Method and Description |
|---|---|
ExtendedSequenceNumber |
getCheckpoint(String shardId)
Gets the current checkpoint of the shard.
|
boolean |
takeLease(KinesisClientLease lease,
String newOwner)
Take a lease for the given owner by incrementing its leaseCounter and setting its owner field.
|
convertAndRethrowExceptions, createLeaseIfNotExists, createLeaseTableIfNotExists, deleteAll, deleteLease, evictLease, getLease, isLeaseTableEmpty, leaseTableExists, listLeases, renewLease, updateLease, updateLeaseWithMetaInfo, waitUntilLeaseTableExistsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateLeaseIfNotExists, createLeaseTableIfNotExists, deleteAll, deleteLease, evictLease, getLease, isLeaseTableEmpty, leaseTableExists, listLeases, renewLease, updateLease, updateLeaseWithMetaInfo, waitUntilLeaseTableExists@Deprecated public KinesisClientLeaseManager(String table, com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDBClient)
table - Leases tabledynamoDBClient - DynamoDB client to usepublic KinesisClientLeaseManager(String table, com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDBClient, com.amazonaws.services.dynamodbv2.model.BillingMode billingMode)
table - Leases tabledynamoDBClient - DynamoDB client to use@Deprecated public KinesisClientLeaseManager(String table, com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDBClient, boolean consistentReads)
table - leases tabledynamoDBClient - DynamoDB client to useconsistentReads - true if we want consistent reads for testing purposes.public KinesisClientLeaseManager(String table, com.amazonaws.services.dynamodbv2.AmazonDynamoDB dynamoDBClient, boolean consistentReads, com.amazonaws.services.dynamodbv2.model.BillingMode billingMode)
table - leases tabledynamoDBClient - DynamoDB client to useconsistentReads - true if we want consistent reads for testing purposes.public boolean takeLease(KinesisClientLease lease, String newOwner) throws DependencyException, InvalidStateException, ProvisionedThroughputException
takeLease in interface ILeaseManager<KinesisClientLease>takeLease in class LeaseManager<KinesisClientLease>lease - the lease to takenewOwner - the new ownerDependencyException - if DynamoDB update fails in an unexpected wayInvalidStateException - if lease table does not existProvisionedThroughputException - if DynamoDB update fails due to lack of capacitypublic ExtendedSequenceNumber getCheckpoint(String shardId) throws ProvisionedThroughputException, InvalidStateException, DependencyException
getCheckpoint in interface IKinesisClientLeaseManagershardId - Checkpoint of this shard will be returnedProvisionedThroughputException - if DynamoDB update fails due to lack of capacityInvalidStateException - if lease table does not existDependencyException - if DynamoDB update fails in an unexpected wayCopyright © 2024. All rights reserved.