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 TypeMethodDescriptionvoidaddNotReceived(Address sender) voidvoidaddSuspect(Address sender) voidclear()booleancontainsKey(Object key) booleancontainsValue(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 keybooleanisEmpty()booleanisReceived(Address sender) booleanisSuspected(Address sender) keySet()intintvoidvoidreset()Deprecated.Useclear()insteadintsize()toString()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
containsKeyin interfaceMap<Address,Rsp>
-
containsValue
- Specified by:
containsValuein 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