org.rx.core.WaitHandle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxlib Show documentation
Show all versions of rxlib Show documentation
A set of utilities for Java
package org.rx.core;
import org.apache.commons.lang3.exception.ExceptionUtils;
import java.util.concurrent.TimeoutException;
public interface WaitHandle {
static TimeoutException newTimeoutException(String message, Throwable e) {
StringBuilder buf = new StringBuilder(message);
if (e != null) {
buf.append("\n").append(ExceptionUtils.getStackTrace(e));
}
return new TimeoutException(buf.toString());
}
boolean await(long timeoutMillis);
void signalAll();
}