Package org.jgroups.util
Class MatchingPromise<T>
- java.lang.Object
-
- org.jgroups.util.Promise<T>
-
- org.jgroups.util.MatchingPromise<T>
-
public class MatchingPromise<T> extends Promise<T>
A promise which only sets the result if it matches the expected result- Since:
- 4.0.16
- Author:
- Bela Ban
-
-
Constructor Summary
Constructors Constructor Description MatchingPromise(T expected_result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getExpectedResult()
void
reset(T expected_result)
void
reset(T expected_result, boolean signal)
void
setResult(T result)
Sets the result only if expected_result matches resultjava.lang.String
toString()
-
Methods inherited from class org.jgroups.util.Promise
_getResultWithTimeout, getResult, getResult, getResult, getResultWithTimeout, getResultWithTimeout, hasResult, reset, reset
-
-
-
-
Field Detail
-
expected_result
protected T expected_result
-
-
Constructor Detail
-
MatchingPromise
public MatchingPromise(T expected_result)
-
-