private void handleException(Object listener, Throwable e) { //this code is roughly copied from InternalPlatform.run(ISafeRunnable), //but in-lined here for performance reasons if (e instanceof OperationCanceledException) return; String pluginId = JobOSGiUtils.getDefault().getBundleId(listener); if (pluginId == null) pluginId = JobManager.PI_JOBS; String message = NLS.bind(JobMessages.meta_pluginProblems, pluginId); RuntimeLog.log(new Status(IStatus.ERROR, pluginId, JobManager.PLUGIN_ERROR, message, e)); }
/** * This method is called upon plug-in activation */ public void start(BundleContext context) throws Exception { bundleContext = context; JobOSGiUtils.getDefault().openServices(); boolean shouldRegister = !"false".equalsIgnoreCase(context.getProperty(PROP_REGISTER_JOB_SERVICE)); //$NON-NLS-1$ if (shouldRegister) registerServices(); }
private void initDebugOptions() { DEBUG = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_JOBS, false); DEBUG_BEGIN_END = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_BEGIN_END, false); DEBUG_YIELDING = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_YIELDING, false); DEBUG_YIELDING_DETAILED = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_YIELDING_DETAILED, false); DEBUG_DEADLOCK = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEADLOCK_ERROR, false); DEBUG_LOCKS = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_LOCKS, false); DEBUG_TIMING = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_JOBS_TIMING, false); DEBUG_SHUTDOWN = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_SHUTDOWN, false); }
/** * This method is called when the plug-in is stopped */ public void stop(BundleContext context) throws Exception { unregisterServices(); JobManager.shutdown(); JobOSGiUtils.getDefault().closeServices(); bundleContext = null; }
private JobManager() { instance = this; initDebugOptions(); synchronized (lock) { waiting = new JobQueue(false); sleeping = new JobQueue(true); running = new HashSet(10); pool = new WorkerPool(this); } pool.setDaemon(JobOSGiUtils.getDefault().useDaemonThreads()); }
/** * This method is called when the plug-in is stopped */ @Override public void stop(BundleContext context) throws Exception { unregisterServices(); JobManager.shutdown(); JobOSGiUtils.getDefault().closeServices(); bundleContext = null; }
private JobManager() { instance = this; synchronized (lock) { waiting = new JobQueue(false); waitingThreadJobs = new JobQueue(false, false); sleeping = new JobQueue(true); running = new HashSet<InternalJob>(10); yielding = new HashSet<InternalJob>(10); pool = new WorkerPool(this); } pool.setDaemon(JobOSGiUtils.getDefault().useDaemonThreads()); internalWorker = new InternalWorker(this); internalWorker.setDaemon(JobOSGiUtils.getDefault().useDaemonThreads()); internalWorker.start(); jobListeners.add(jobGroupUpdater); }
/** * This method is called upon plug-in activation */ public void start(BundleContext context) throws Exception { bundleContext = context; JobOSGiUtils.getDefault().openServices(); boolean shouldRegister = !"false".equalsIgnoreCase(context.getProperty(PROP_REGISTER_JOB_SERVICE)); //$NON-NLS-1$ if (shouldRegister) registerServices(); }
private void handleException(IJobChangeListener listener, Throwable e) { //this code is roughly copied from InternalPlatform.run(ISafeRunnable), //but in-lined here for performance reasons if (e instanceof OperationCanceledException) return; String pluginId = JobOSGiUtils.getDefault().getBundleId(listener); if (pluginId == null) pluginId = JobManager.PI_JOBS; String message = NLS.bind(JobMessages.meta_pluginProblems, pluginId); RuntimeLog.log(new Status(IStatus.ERROR, pluginId, JobManager.PLUGIN_ERROR, message, e)); }
/** * This method is called when the plug-in is stopped */ public void stop(BundleContext context) throws Exception { unregisterServices(); JobManager.shutdown(); JobOSGiUtils.getDefault().closeServices(); bundleContext = null; }
private JobManager() { instance = this; synchronized (lock) { waiting = new JobQueue(false); waitingThreadJobs = new JobQueue(false, false); sleeping = new JobQueue(true); running = new HashSet<>(10); yielding = new HashSet<>(10); pool = new WorkerPool(this); } pool.setDaemon(JobOSGiUtils.getDefault().useDaemonThreads()); internalWorker = new InternalWorker(this); internalWorker.setDaemon(JobOSGiUtils.getDefault().useDaemonThreads()); internalWorker.start(); jobListeners.add(jobGroupUpdater); }
private void initDebugOptions() { DEBUG = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_JOBS, false); DEBUG_BEGIN_END = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_BEGIN_END, false); DEBUG_DEADLOCK = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEADLOCK_ERROR, false); DEBUG_LOCKS = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_LOCKS, false); DEBUG_TIMING = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_DEBUG_JOBS_TIMING, false); DEBUG_SHUTDOWN = JobOSGiUtils.getDefault().getBooleanDebugOption(OPTION_SHUTDOWN, false); }
/** * This method is called upon plug-in activation */ @Override public void start(BundleContext context) throws Exception { bundleContext = context; JobOSGiUtils.getDefault().openServices(); boolean shouldRegister = !"false".equalsIgnoreCase(context.getProperty(PROP_REGISTER_JOB_SERVICE)); //$NON-NLS-1$ if (shouldRegister) registerServices(); }
private void handleException(Object listener, Throwable e) { //this code is roughly copied from InternalPlatform.run(ISafeRunnable), //but in-lined here for performance reasons if (e instanceof OperationCanceledException) return; String pluginId = JobOSGiUtils.getDefault().getBundleId(listener); if (pluginId == null) pluginId = JobManager.PI_JOBS; String message = NLS.bind(JobMessages.meta_pluginProblems, pluginId); RuntimeLog.log(new Status(IStatus.ERROR, pluginId, JobManager.PLUGIN_ERROR, message, e)); }
/** * This method is called when the plug-in is stopped */ @Override public void stop(BundleContext context) throws Exception { unregisterServices(); JobManager.shutdown(); JobOSGiUtils.getDefault().closeServices(); bundleContext = null; }
private JobManager() { instance = this; initDebugOptions(); synchronized (lock) { waiting = new JobQueue(false); waitingThreadJobs = new JobQueue(false, false); sleeping = new JobQueue(true); running = new HashSet(10); yielding = new HashSet(10); pool = new WorkerPool(this); } pool.setDaemon(JobOSGiUtils.getDefault().useDaemonThreads()); internalWorker = new InternalWorker(this); internalWorker.setDaemon(JobOSGiUtils.getDefault().useDaemonThreads()); internalWorker.start(); }
/** * This method is called upon plug-in activation */ @Override public void start(BundleContext context) throws Exception { bundleContext = context; JobOSGiUtils.getDefault().openServices(); boolean shouldRegister = !"false".equalsIgnoreCase(context.getProperty(PROP_REGISTER_JOB_SERVICE)); //$NON-NLS-1$ if (shouldRegister) registerServices(); }
private void handleException(Object listener, Throwable e) { //this code is roughly copied from InternalPlatform.run(ISafeRunnable), //but in-lined here for performance reasons if (e instanceof OperationCanceledException) return; String pluginId = JobOSGiUtils.getDefault().getBundleId(listener); if (pluginId == null) pluginId = JobManager.PI_JOBS; String message = NLS.bind(JobMessages.meta_pluginProblems, pluginId); RuntimeLog.log(new Status(IStatus.ERROR, pluginId, JobManager.PLUGIN_ERROR, message, e)); }