agave-common/common-core/src/main/java/org/iplantc/service/common/queue/GenericSchedulingPlugin.java
/**
     * Called in order to inform the {@link SchedulerPlugin} that it
     * should free up all of it's resources because the scheduler is shutting
     * down.
     */
Called in order to inform the  SchedulerPlugin that it
should free up all of it's resources because the scheduler is shutting
down.
Called in order to inform the SchedulerPlugin that it should free up all of it ' s resources because the scheduler is shutting down .
@Override
	public void shutdown()
	{
		try
		{
			log.debug("Shutting down " + getPluginGroup().toLowerCase() + " queue...");
			for (JobExecutionContext jobContext : scheduler.getCurrentlyExecutingJobs())
			{
				Job job = jobContext.getJobInstance();
				if (job instanceof MessageQueueListener) {
					((MessageQueueListener)job).stop();
				}
				else if (job instanceof InterruptableJob) {
					((InterruptableJob)job).interrupt();
				}
			}
		}
		catch (NullPointerException e) {
		}
		catch (SchedulerException e)
		{
			log.error("Failed to shut down queue properly.", e);
		}
	}
@ Override public void shutdown ( ) { try { log . debug ( "Shutting down " + getPluginGroup ( ) . toLowerCase ( ) + " queue..." ) ; for ( JobExecutionContext jobContext : scheduler . getCurrentlyExecutingJobs ( ) ) { Job job = jobContext . getJobInstance ( ) ; if ( job instanceof MessageQueueListener ) { ( ( MessageQueueListener ) job ) . stop ( ) ; } else if ( job instanceof InterruptableJob ) { ( ( InterruptableJob ) job ) . interrupt ( ) ; } } } catch ( NullPointerException e ) { } catch ( SchedulerException e ) { log . error ( "Failed to shut down queue properly." , e ) ; } }
Called in order to inform the {@link SchedulerPlugin} that it
 should free up all of it's resources because the scheduler is shutting
 down.
Called in order to inform the { @link SchedulerPlugin } that it should free up all of it ' s resources because the scheduler is shutting down .
// nothing to do here. scheduler is already shutting down. // happens when the scheduler wasn't initialized properly. Ususally due to us // disabling it completely.