com.github.phantomthief.concurrent.TryWaitUncheckedException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of more-lambdas Show documentation
Show all versions of more-lambdas Show documentation
Some useful lambda implements for Java 8.
package com.github.phantomthief.concurrent;
import java.util.Map;
import java.util.concurrent.CancellationException;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nonnull;
/**
* @author w.vela
* Created on 2018-06-25.
*/
@SuppressWarnings("unchecked")
public class TryWaitUncheckedException extends RuntimeException {
private final TryWaitResult result;
TryWaitUncheckedException(TryWaitResult result) {
this.result = result;
}
@Nonnull
public Map getSuccess() {
return result.getSuccess();
}
@Nonnull
public Map getFailed() {
return result.getFailed();
}
@Nonnull
public Map getTimeout() {
return result.getTimeout();
}
@Nonnull
public Map getCancel() {
return result.getCancel();
}
@Nonnull
public Map cancelAllTimeout(boolean mayInterruptIfRunning) {
return result.cancelAllTimeout(mayInterruptIfRunning);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy