mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 07:40:55 +03:00
reformat
This commit is contained in:
@@ -31,7 +31,8 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
*
|
||||
* @see Future
|
||||
*/
|
||||
public class Event<T extends Exception> extends Future<Boolean, T> {
|
||||
public class Event<T extends Exception>
|
||||
extends Future<Boolean, T> {
|
||||
|
||||
/**
|
||||
* Creates this event with given {@code name} and exception {@code chainer}. Allocates a new {@link
|
||||
@@ -65,7 +66,8 @@ public class Event<T extends Exception> extends Future<Boolean, T> {
|
||||
*
|
||||
* @throws T if another thread meanwhile informs this event of an error
|
||||
*/
|
||||
public void await() throws T {
|
||||
public void await()
|
||||
throws T {
|
||||
super.get();
|
||||
}
|
||||
|
||||
@@ -73,11 +75,12 @@ public class Event<T extends Exception> extends Future<Boolean, T> {
|
||||
* Await this event to have a definite {@code true} or {@code false} value, for {@code timeout} seconds.
|
||||
*
|
||||
* @param timeout timeout in seconds
|
||||
* @param unit
|
||||
* @param unit the time unit
|
||||
*
|
||||
* @throws T if another thread meanwhile informs this event of an error, or timeout expires
|
||||
*/
|
||||
public void await(long timeout, TimeUnit unit) throws T {
|
||||
public void await(long timeout, TimeUnit unit)
|
||||
throws T {
|
||||
super.get(timeout, unit);
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,8 @@ public class Future<V, T extends Exception> {
|
||||
*
|
||||
* @throws T in case another thread informs the future of an error meanwhile
|
||||
*/
|
||||
public V get() throws T {
|
||||
public V get()
|
||||
throws T {
|
||||
return get(0, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@@ -130,7 +131,8 @@ public class Future<V, T extends Exception> {
|
||||
*
|
||||
* @throws T in case another thread informs the future of an error meanwhile, or the timeout expires
|
||||
*/
|
||||
public V get(long timeout, TimeUnit unit) throws T {
|
||||
public V get(long timeout, TimeUnit unit)
|
||||
throws T {
|
||||
lock();
|
||||
try {
|
||||
if (pendingEx != null)
|
||||
|
||||
Reference in New Issue
Block a user