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

com.github.akurilov.commons.concurrent.StoppableTask Maven / Gradle / Ivy

There is a newer version: 2.3.6
Show newest version
package com.github.akurilov.commons.concurrent;

import java.io.Closeable;
import java.io.IOException;

/**
 * A runnable task which can be stopped by the {@link Closeable#close()} method
 */
public interface StoppableTask
extends Closeable, Runnable {

	/**
	 * Stops the task
	 * @throws IOException if some kind of failure occured
	 */
	@Override
	void close()
	throws IOException;

	/**
	 * @return true if the task was once stopped, false otherwise
	 */
	boolean isClosed();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy