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.ObjectLike a CountDownLatch, but resettable and with some convenience methods
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classTestEnvironment.Latch.ExpectedClosedLatchException(package private) static classTestEnvironment.Latch.ExpectedOpenLatchException
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.CountDownLatchcountDownLatchprivate TestEnvironmentenv
-
Constructor Summary
Constructors Constructor Description Latch(TestEnvironment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertClosed(java.lang.String openErrorMsg)voidassertOpen(java.lang.String closedErrorMsg)voidclose()voidexpectClose(long timeoutMillis, java.lang.String notClosedErrorMsg)voidexpectClose(java.lang.String notClosedErrorMsg)booleanisClosed()voidreOpen()
-
-
-
Field Detail
-
env
private final TestEnvironment env
-
countDownLatch
private volatile java.util.concurrent.CountDownLatch countDownLatch
-
-
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
-
-