Package org.jgroups.util
Class RspList
java.lang.Object
org.jgroups.util.RspList
Contains responses from all members. Marks faulty members.
A RspList is a response list used in peer-to-peer protocols. This class is unsynchronized
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNotReceived
(Address sender) void
void
addSuspect
(Address sender) void
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) elementAt
(int i) Deprecated.entrySet()
Returns the Rsp associated with address keygetFirst()
Returns the first value in the response set.Returns the results from non-suspected members that are not null.Returns the value associated with address keyboolean
isEmpty()
boolean
isReceived
(Address sender) boolean
isSuspected
(Address sender) keySet()
int
int
void
void
reset()
Deprecated.Useclear()
insteadint
size()
toString()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
RspList
public RspList() -
RspList
Adds a list of responses- Parameters:
responses
- Collection
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<Address,
Rsp>
-
containsValue
- Specified by:
containsValue
in interfaceMap<Address,
Rsp>
-
get
Returns the Rsp associated with address key -
getValue
Returns the value associated with address key- Parameters:
key
-- Returns:
- Object value
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
reset
public void reset()Deprecated.Useclear()
insteadClears the response list -
addRsp
-
addNotReceived
-
addSuspect
-
isReceived
-
numSuspectedMembers
public int numSuspectedMembers() -
numReceived
public int numReceived() -
getFirst
Returns the first value in the response set. This is random, but we try to return a non-null value first -
getResults
Returns the results from non-suspected members that are not null. -
getSuspectedMembers
-
isSuspected
-
size
public int size() -
elementAt
Deprecated.UseentrySet()
orvalues()
insteadReturns the Rsp at index i- Parameters:
i
- The index- Returns:
- a Rsp
- Throws:
ArrayIndexOutOfBoundsException
-
toString
-
entrySet()
orvalues()
instead