Skip to content

Instantly share code, notes, and snippets.

@GitEliteNovice
Created January 14, 2018 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GitEliteNovice/20c8454fb530dbd5151d306681de000a to your computer and use it in GitHub Desktop.
Save GitEliteNovice/20c8454fb530dbd5151d306681de000a to your computer and use it in GitHub Desktop.
Rejection Execution Handler
package nation.know.aryan.com.poolofthreads.rejectedExecutionHandler;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
/**
* Created by dell on 1/14/2018.
*/
public class MyRejectedExecutionHandler implements RejectedExecutionHandler {
@Override
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
System.out.println(r.toString() + " is rejected");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment