public final class CountdownCloseable extends Object implements Closeable
countdown
and calls closeable
if reached zero.Constructor and Description |
---|
CountdownCloseable(Closeable closeable,
int countdown) |
Modifier and Type | Method and Description |
---|---|
void |
awaitClosed()
Waiting for one Thread in
CommandlineExecutor.awaitExit() . |
void |
close() |
public CountdownCloseable(@Nonnull Closeable closeable, @Nonnegative int countdown)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void awaitClosed() throws InterruptedException
CommandlineExecutor.awaitExit()
.InterruptedException
- see Object.wait()
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.