Class Node
java.lang.Object
com.yahoo.search.dispatch.searchcluster.Node
A node in a search cluster. This class is multithread safe.
- Author:
- bratseth, ollivir
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Give a monotonically increasing sequence number.boolean
long
int
group()
Returns the index of the group this node belongs to.int
hashCode()
hostname()
boolean
isLastReceivedPong
(long pingId) Checks if this pong is received in line and accepted, or out of band and should be ignored.Returns whether this node is currently responding to requests, or null if status is not knownint
key()
Returns the unique and stable distribution key of this nodeint
void
setActiveDocuments
(long documents) Updates the active documents on this nodevoid
setBlockingWrites
(boolean isBlockingWrites) void
setTargetActiveDocuments
(long documents) void
setWorking
(boolean working) toString()
-
Constructor Details
-
Node
-
-
Method Details
-
createPingSequenceId
public long createPingSequenceId()Give a monotonically increasing sequence number. -
isLastReceivedPong
public boolean isLastReceivedPong(long pingId) Checks if this pong is received in line and accepted, or out of band and should be ignored. -
getLastReceivedPongId
public long getLastReceivedPongId() -
key
public int key()Returns the unique and stable distribution key of this node -
pathIndex
public int pathIndex() -
hostname
-
group
public int group()Returns the index of the group this node belongs to. This is a 0-base continuous integer id, not necessarily the same as the group id assigned by the application/node repo. -
setWorking
public void setWorking(boolean working) -
isWorking
Returns whether this node is currently responding to requests, or null if status is not known -
setActiveDocuments
public void setActiveDocuments(long documents) Updates the active documents on this node -
setTargetActiveDocuments
public void setTargetActiveDocuments(long documents) -
setBlockingWrites
public void setBlockingWrites(boolean isBlockingWrites) -
hashCode
public int hashCode() -
equals
-
toString
-