All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.machinecode.then.api.OnCancel Maven / Gradle / Ivy

There is a newer version: 0.3.0
Show newest version
package io.machinecode.then.api;

/**
 * 

Listener for a {@link Promise} entering a {@link Deferred#CANCELLED} terminal state.

* * @see Promise * @author Brent Douglas * @since 1.0 */ public interface OnCancel { /** * @param mayInterrupt If a running computation may be interrupted. * @return {@code true} If the promise was cancelled, {@code false} if it had already reached another terminal state. * @see java.util.concurrent.Future#cancel(boolean) */ boolean cancel(final boolean mayInterrupt); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy