public class LeaseCleanupManager extends Object
LeaseManagementConfig#leaseCleanupConfig() asynchronously.| Modifier and Type | Class and Description |
|---|---|
static class |
LeaseCleanupManager.LeaseCleanupResult |
| Constructor and Description |
|---|
LeaseCleanupManager() |
| Modifier and Type | Method and Description |
|---|---|
LeaseCleanupManager.LeaseCleanupResult |
cleanupLease(LeasePendingDeletion leasePendingDeletion,
boolean timeToCheckForCompletedShard,
boolean timeToCheckForGarbageShard) |
void |
enqueueForDeletion(LeasePendingDeletion leasePendingDeletion)
Enqueues a lease for deletion without check for duplicate entry.
|
boolean |
isEnqueuedForDeletion(LeasePendingDeletion leasePendingDeletion)
Check if lease was already enqueued for deletion.
|
void |
shutdown()
Stops the lease cleanup thread, which is scheduled periodically as specified by
leaseCleanupIntervalMillis |
void |
start()
Starts the lease cleanup thread, which is scheduled periodically as specified by
leaseCleanupIntervalMillis |
public void start()
leaseCleanupIntervalMillispublic void shutdown()
leaseCleanupIntervalMillispublic void enqueueForDeletion(LeasePendingDeletion leasePendingDeletion)
isEnqueuedForDeletion(software.amazon.kinesis.leases.exceptions.LeasePendingDeletion)
for checking the duplicate entries.leasePendingDeletion - public boolean isEnqueuedForDeletion(LeasePendingDeletion leasePendingDeletion)
leasePendingDeletion - public LeaseCleanupManager.LeaseCleanupResult cleanupLease(LeasePendingDeletion leasePendingDeletion, boolean timeToCheckForCompletedShard, boolean timeToCheckForGarbageShard) throws TimeoutException, InterruptedException, DependencyException, ProvisionedThroughputException, InvalidStateException
Copyright © 2023. All rights reserved.