public int getShutdownTimeout() { return muleConfiguration.getShutdownTimeout(); }
if (!scheduler.awaitTermination(muleContext.getConfiguration().getShutdownTimeout(), TimeUnit.MILLISECONDS))
@Override protected MuleWorkManager createWorkManager() { // use app name in the core Mule thread final String threadName = String.format("[%s].Mule", desc.getName()); return new MuleWorkManager(ThreadingProfile.DEFAULT_THREADING_PROFILE, threadName, getMuleConfiguration().getShutdownTimeout()); } }
private WorkManager createWorkManager() { final WorkManager workManager = workerThreadingProfile.createWorkManager(format("%s%s.%s", ThreadNameHelper.getPrefix(muleContext), name, "worker"), muleContext.getConfiguration().getShutdownTimeout()); if (workManager instanceof MuleContextAware) { ((MuleContextAware) workManager).setMuleContext(muleContext); } return workManager; }
public synchronized void start() throws MuleException { gracefulShutdownTimeout = getMuleContext().getConfiguration().getShutdownTimeout(); if (workExecutorService == null) { workExecutorService = threadingProfile.createPool(name); } }
private WorkManager createWorkManager() { int shutdownTimeout = endpoint.getMuleContext().getConfiguration().getShutdownTimeout(); return new TrackingWorkManager(new WorkManagerHolder() { @Override public WorkManager getWorkManager() { return getConnectorWorkManager(); } }, shutdownTimeout); }
schedule.cancel(false); int shutdownTimeout = endpoint.getMuleContext().getConfiguration().getShutdownTimeout(); PollingReceiverWorker worker = schedules.get(schedule); for (int elapsed = 0; worker.isRunning() && elapsed < shutdownTimeout; elapsed += 50)
protected MuleWorkManager createWorkManager() { final MuleConfiguration config = getMuleConfiguration(); // still can be embedded, but in container mode, e.g. in a WAR final String threadPrefix = config.isContainerMode() ? String.format("[%s].Mule", config.getId()) : "MuleServer"; ImmutableThreadingProfile threadingProfile = createMuleWorkManager(); return new MuleWorkManager(threadingProfile, threadPrefix, config.getShutdownTimeout()); }
public SedaStageInterceptingMessageProcessor(String threadName, String queueName, QueueProfile queueProfile, int queueTimeout, ThreadingProfile threadingProfile, QueueStatistics queueStatistics, MuleContext muleContext) { super(threadingProfile, threadName, muleContext.getConfiguration().getShutdownTimeout()); this.queueName = queueName; this.queueProfile = queueProfile; this.queueTimeout = queueTimeout; this.queueStatistics = queueStatistics; this.muleContext = muleContext; lifecycleManager = new SedaStageLifecycleManager(queueName, this); // If user has not set an explicit queue size set one here, to prevent OutOfMemoryException's. configureDefaultQueueSize(queueProfile, threadingProfile); }
protected AsyncInterceptingMessageProcessor createAsyncMessageProcessor(org.mule.api.processor.StageNameSource nameSource, MuleContext muleContext) { return new AsyncInterceptingMessageProcessor(createThreadingProfile(muleContext), getThreadPoolName( nameSource.getName(), muleContext), muleContext.getConfiguration().getShutdownTimeout()); }
threadPrefix, muleContext.getConfiguration().getShutdownTimeout()); threadPrefix, muleContext.getConfiguration().getShutdownTimeout()); threadPrefix, muleContext.getConfiguration().getShutdownTimeout());
public WorkManager createWorkManager(FlowConstruct flowConstruct) { MuleContext muleContext = flowConstruct.getMuleContext(); ThreadingProfile threadingProfile = createThreadingProfile(muleContext); if (poolExhaustedAction == null) { threadingProfile.setPoolExhaustedAction(WHEN_EXHAUSTED_WAIT); } MuleWorkManager workManager = (MuleWorkManager) threadingProfile.createWorkManager (getThreadPoolName(flowConstruct.getName(), muleContext), muleContext.getConfiguration() .getShutdownTimeout()); return workManager; }
muleContext.getConfiguration().getShutdownTimeout());