public class NodeMonitor extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
atStartUp |
private boolean |
isWorking |
protected static Logger |
log |
private VespaBackEndSearcher |
node
The object representing the monitored node
|
private boolean |
searchNodesOnline
Whether it is assumed the node has documents available to serve
|
private long |
succeededAt
The last time this node responded successfully
|
Constructor and Description |
---|
NodeMonitor(VespaBackEndSearcher node)
Creates a new node monitor for a node
|
Modifier and Type | Method and Description |
---|---|
void |
failed(ErrorMessage error)
Called when this node fails.
|
VespaBackEndSearcher |
getNode() |
boolean |
isWorking()
Returns whether this node is currently in a state suitable for receiving
traffic.
|
void |
responded(boolean searchNodesOnline)
Called when a response is received from this node.
|
(package private) boolean |
searchNodesOnline() |
private void |
setWorking(boolean working,
String explanation)
Changes the state of this node if required
|
protected static Logger log
private final VespaBackEndSearcher node
private boolean isWorking
private long succeededAt
private boolean searchNodesOnline
private boolean atStartUp
public NodeMonitor(VespaBackEndSearcher node)
public boolean isWorking()
public VespaBackEndSearcher getNode()
public void failed(ErrorMessage error)
error
- a container which should contain a short descriptionpublic void responded(boolean searchNodesOnline)
private void setWorking(boolean working, String explanation)
boolean searchNodesOnline()
Copyright © 2018. All rights reserved.