Class CountdownCloseable
- java.lang.Object
-
- org.apache.maven.surefire.extensions.util.CountdownCloseable
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class CountdownCloseable extends Object implements Closeable
Decrementscountdown
and callscloseable
if reached zero.
-
-
Constructor Summary
Constructors Constructor Description CountdownCloseable(Closeable closeable, int countdown)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
awaitClosed()
Waiting for one Thread inCommandlineExecutor.awaitExit()
.void
close()
-
-
-
Constructor Detail
-
CountdownCloseable
public CountdownCloseable(@Nonnull Closeable closeable, @Nonnegative int countdown)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
awaitClosed
public void awaitClosed() throws InterruptedException
Waiting for one Thread inCommandlineExecutor.awaitExit()
.- Throws:
InterruptedException
- seeObject.wait()
-
-