Package org.jgroups.util
Class Responses
java.lang.Object
org.jgroups.util.Responses
Manages responses for the discovery protocol. Moved from
Discovery
into this standalone class. Responses are only added but never removed.- Since:
- 3.5
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Responses_done()protected voidaddResponse(PingData rsp, boolean overwrite) clear()booleandone()protected intfindResponseFrom(Address mbr) booleanbooleanisDone()booleanisEmpty()iterator()protected static intnewLength(int length) protected int[]print()protected voidresize(int new_size) intsize()toList()toString()booleanwaitFor(long timeout) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
ping_rsps
-
index
protected int index -
lock
-
cond
-
num_expected_rsps
protected final int num_expected_rsps -
break_on_coord_rsp
protected final boolean break_on_coord_rsp -
done
protected boolean done
-
-
Constructor Details
-
Responses
public Responses(boolean break_on_coord_rsp) -
Responses
public Responses(int num_expected_rsps, boolean break_on_coord_rsp) -
Responses
public Responses(int num_expected_rsps, boolean break_on_coord_rsp, int initial_capacity)
-
-
Method Details
-
isDone
public boolean isDone() -
done
-
clear
-
addResponse
-
add
-
containsResponseFrom
-
isCoord
-
findResponseFrom
-
waitFor
public boolean waitFor(long timeout) -
iterator
-
size
public int size() -
isEmpty
public boolean isEmpty() -
toString
-
print
-
_done
-
numResponses
protected int[] numResponses() -
toList
-
resize
protected void resize(int new_size) -
add
-
find
-
newLength
protected static int newLength(int length)
-