public interface LeaseTaker
Modifier and Type | Method and Description |
---|---|
default List<Lease> |
allLeases()
Default implementation returns an empty list and concrete implementaion is expected to return all leases
for the application that are in the lease table either by reading lease table or from an internal cache.
|
String |
getWorkerIdentifier() |
Map<String,Lease> |
takeLeases()
Compute the set of leases available to be taken and attempt to take them.
|
Map<String,Lease> takeLeases() throws DependencyException, InvalidStateException
DependencyException
- on unexpected DynamoDB failuresInvalidStateException
- if lease table does not existString getWorkerIdentifier()
default List<Lease> allLeases()
Copyright © 2025. All rights reserved.