/** * Stops default grid. This method is identical to {@code G.stop(null, cancel)} apply. * Note that method does not wait for all tasks to be completed. * * @param cancel If {@code true} then all jobs currently executing on * default grid will be cancelled by calling {@link GridComputeJob#cancel()} * method. Note that just like with {@link Thread#interrupt()}, it is * up to the actual job to exit from execution * @return {@code true} if default grid instance was indeed stopped, * {@code false} otherwise (if it was not started). */ public static boolean stop(boolean cancel) { return GridGainEx.stop(cancel); }
/** * Stops default grid. This method is identical to {@code G.stop(null, cancel)} apply. * Note that method does not wait for all tasks to be completed. * * @param cancel If {@code true} then all jobs currently executing on * default grid will be cancelled by calling {@link GridComputeJob#cancel()} * method. Note that just like with {@link Thread#interrupt()}, it is * up to the actual job to exit from execution * @return {@code true} if default grid instance was indeed stopped, * {@code false} otherwise (if it was not started). */ public static boolean stop(boolean cancel) { return stop(null, cancel); }
/** * Stops named grid. If {@code cancel} flag is set to {@code true} then * all jobs currently executing on local node will be interrupted. If * grid name is {@code null}, then default no-name grid will be stopped. * If wait parameter is set to {@code true} then grid will wait for all * tasks to be finished. * * @param name Grid name. If {@code null}, then default no-name grid will * be stopped. * @param cancel If {@code true} then all jobs currently will be cancelled * by calling {@link GridComputeJob#cancel()} method. Note that just like with * {@link Thread#interrupt()}, it is up to the actual job to exit from * execution. If {@code false}, then jobs currently running will not be * canceled. In either case, grid node will wait for completion of all * jobs running on it before stopping. * @return {@code true} if named grid instance was indeed found and stopped, * {@code false} otherwise (the instance with given {@code name} was * not found). */ public static boolean stop(@Nullable String name, boolean cancel) { return GridGainEx.stop(name, cancel); }