final class Pruner
extends java.lang.Object
implements java.lang.Runnable
DiscoveryEvent.Type
LOST events.Modifier and Type | Field and Description |
---|---|
(package private) static int |
DEFAULT_MAX_HB_TIME |
(package private) static double |
HB_MISSED_BEFORE_DOWN
This is how many heart beats to wait before considering the service down.
|
private boolean |
isRunning |
(package private) int |
maxHBTime
The maximum time to wait for the next heart beat, no matter what.
|
private PacketProcessor |
processor |
(package private) static long |
PRUNING_INTERVAL
How often to check for packets to mark as dead.
|
Constructor and Description |
---|
Pruner(PacketProcessor processor,
int maxHBTime) |
Modifier and Type | Method and Description |
---|---|
private void |
checkPackets() |
private void |
remove(PacketProcessor.DiscoverableInfo info) |
void |
run() |
void |
stop() |
static final long PRUNING_INTERVAL
static final int DEFAULT_MAX_HB_TIME
maxHBTime
,
Constant Field Valuesfinal int maxHBTime
static double HB_MISSED_BEFORE_DOWN
private volatile boolean isRunning
private final PacketProcessor processor
public Pruner(PacketProcessor processor, int maxHBTime)
public void run()
run
in interface java.lang.Runnable
private void checkPackets()
private void remove(PacketProcessor.DiscoverableInfo info)
key
- the descriptor to remove.public void stop()