public class DynamoDBLeaseDiscoverer extends Object implements LeaseDiscoverer
LeaseDiscoverer, it uses LeaseRefresher to query
DynamoDBLeaseRefresher.LEASE_OWNER_TO_LEASE_KEY_INDEX_NAME and find the leases assigned
to current worker and then filter and returns the leases that have not started processing (looks at
LeaseRenewer.getCurrentlyHeldLeases() to find out which leases are currently held leases).| Constructor and Description |
|---|
DynamoDBLeaseDiscoverer() |
| Modifier and Type | Method and Description |
|---|---|
List<Lease> |
discoverNewLeases()
Identifies the leases that are assigned to the current worker but are not being tracked and processed by the
current worker.
|
public List<Lease> discoverNewLeases() throws ProvisionedThroughputException, InvalidStateException, DependencyException
LeaseDiscovererdiscoverNewLeases in interface LeaseDiscovererProvisionedThroughputException - if DynamoDB scan fails due to lack of capacityInvalidStateException - if lease table does not existDependencyException - if DynamoDB scan fails in an unexpected wayCopyright © 2024. All rights reserved.