private final class LeaseRenewalManager.RenewTask extends Object implements TaskManager.Task
Modifier and Type | Field and Description |
---|---|
private List |
bList
Entries of leases to renew (if multiple, all can be batched)
|
private boolean |
noRenewals
True if this task only holds leases that have reached their
actual or desired expiration
|
Constructor and Description |
---|
LeaseRenewalManager.RenewTask(long now)
Create a collection of entries whose leases can be batch
renewed with the last lease in the map, or a list of entries
whose leases need to be removed.
|
Modifier and Type | Method and Description |
---|---|
private List |
processBadLeases(long now)
Find any expired leases, remove them from bList and
leaseInRenew, and return any with listeners.
|
void |
run() |
boolean |
runAfter(List tasks,
int size)
No ordering.
|
private final List bList
private final boolean noRenewals
LeaseRenewalManager.RenewTask(long now)
public boolean runAfter(List tasks, int size)
runAfter
in interface TaskManager.Task
tasks
- the tasks to consider. A read-only List, with all
elements instanceof Task.size
- elements with index less than size should be consideredprivate List processBadLeases(long now)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.