Package org.reactivestreams.tck
Class TestEnvironment.Latch
- java.lang.Object
-
- org.reactivestreams.tck.TestEnvironment.Latch
-
- Enclosing class:
- TestEnvironment
public static class TestEnvironment.Latch extends java.lang.Object
Like a CountDownLatch, but resettable and with some convenience methods
-
-
Constructor Summary
Constructors Constructor Description Latch(TestEnvironment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertClosed(java.lang.String openErrorMsg)
void
assertOpen(java.lang.String closedErrorMsg)
void
close()
void
expectClose(long timeoutMillis, java.lang.String notClosedErrorMsg)
void
expectClose(java.lang.String notClosedErrorMsg)
boolean
isClosed()
void
reOpen()
-
-
-
Constructor Detail
-
Latch
public Latch(TestEnvironment env)
-
-
Method Detail
-
reOpen
public void reOpen()
-
isClosed
public boolean isClosed()
-
close
public void close()
-
assertClosed
public void assertClosed(java.lang.String openErrorMsg)
-
assertOpen
public void assertOpen(java.lang.String closedErrorMsg)
-
expectClose
public void expectClose(java.lang.String notClosedErrorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
expectClose
public void expectClose(long timeoutMillis, java.lang.String notClosedErrorMsg) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-