Examples of TaskScheduler


Examples of bitronix.tm.timer.TaskScheduler

     * Create the task scheduler.
     * @return the task scheduler.
     */
    public synchronized static TaskScheduler getTaskScheduler() {
        if (taskScheduler == null) {
            taskScheduler = new TaskScheduler();
            taskScheduler.start();
        }
        return taskScheduler;
    }
View Full Code Here

Examples of bitronix.tm.timer.TaskScheduler

    /**
     * Create the task scheduler.
     * @return the task scheduler.
     */
    public static TaskScheduler getTaskScheduler() {
        TaskScheduler taskScheduler = taskSchedulerRef.get();
        if (taskScheduler == null) {
            taskScheduler = new TaskScheduler();
            if (!taskSchedulerRef.compareAndSet(null, taskScheduler)) {
                taskScheduler = taskSchedulerRef.get();
            } else {
                taskScheduler.start();
            }
        }
        return taskScheduler;
    }
View Full Code Here

Examples of ca.eandb.jdcp.server.scheduling.TaskScheduler

      logger.info("Initializing service");
      DbClassManager classManager = new DbClassManager(ds);
      classManager.prepareDataSource();

      TaskScheduler scheduler = new PrioritySerialTaskScheduler();
      Executor executor = Executors.newCachedThreadPool();
      jobServer = new JobServer(jobsDirectory, factory, scheduler, classManager, executor);
      AuthenticationServer authServer = new AuthenticationServer(jobServer, JdcpUtil.DEFAULT_PORT);

      logger.info("Binding service");
View Full Code Here

Examples of ca.eandb.jdcp.server.scheduling.TaskScheduler

      System.err.print("Initializing service...");
      DbClassManager classManager = new DbClassManager(ds);
      classManager.prepareDataSource();

      TaskScheduler scheduler = new PrioritySerialTaskScheduler();
      Executor executor = Executors.newCachedThreadPool();
      JobServer jobServer = new JobServer(jobsDirectory, panel, scheduler, classManager, executor);
      AuthenticationServer authServer = new AuthenticationServer(jobServer, JdcpUtil.DEFAULT_PORT);
      System.err.println("OK");
View Full Code Here

Examples of com.sun.sgs.kernel.TaskScheduler

    DATA_STORE_CLASS_PROPERTY);
      optimisticWriteLocks = wrappedProps.getBooleanProperty(
    OPTIMISTIC_WRITE_LOCKS, Boolean.FALSE);
      trackStaleObjects = wrappedProps.getBooleanProperty(
    TRACK_STALE_OBJECTS_PROPERTY, Boolean.FALSE);
      TaskScheduler taskScheduler =
    systemRegistry.getComponent(TaskScheduler.class);
      Identity taskOwner = txnProxy.getCurrentOwner();
      scheduler = new DelegatingScheduler(taskScheduler, taskOwner);
            NodeType nodeType =
                wrappedProps.getEnumProperty(StandardProperties.NODE_TYPE,
View Full Code Here

Examples of com.sun.sgs.kernel.TaskScheduler

    Level.SEVERE, e, "JeEnvironment initialization failed");
      throw e;
  }
  if (stats >= 0) {
      statsTask = new StatsRunnable();
      TaskScheduler taskScheduler =
    systemRegistry.getComponent(TaskScheduler.class);
      statsTaskHandle = taskScheduler.scheduleRecurringTask(
    statsTask, txnProxy.getCurrentOwner(),
    System.currentTimeMillis() + stats, stats);
  }

        logger.log(Level.CONFIG,
View Full Code Here

Examples of com.sun.sgs.kernel.TaskScheduler

    "DataStore directory does not exist: " + directory);
  } catch (DatabaseException e) {
      throw convertException(e, false);
  }
  checkpointTask = new CheckpointRunnable(checkpointSize);
  TaskScheduler taskScheduler =
      systemRegistry.getComponent(TaskScheduler.class);
  checkpointTaskHandle = taskScheduler.scheduleRecurringTask(
      checkpointTask, txnProxy.getCurrentOwner(),
      System.currentTimeMillis() + checkpointInterval,
      checkpointInterval);

        logger.log(Level.CONFIG,
View Full Code Here

Examples of org.apache.synapse.task.TaskScheduler

            * Carbon Scheduled Tasks Component is used.
            * Since the Scheduled Tasks Component itself does not initialize a
            * TaskScheduler instance,this code snippet is used to initialize a
            * the required instance manually.
            */
            TaskScheduler taskScheduler = (TaskScheduler) configurationContext.getProperty(
                    TaskManager.CARBON_TASK_SCHEDULER);
            if (taskScheduler == null) {
                taskScheduler = new TaskScheduler(TaskManager.CARBON_TASK_SCHEDULER);
                taskScheduler.init(null);
                configurationContext.setProperty(
                        TaskManager.CARBON_TASK_SCHEDULER, taskScheduler);
            } else if (taskScheduler.isInitialized()) {
                taskScheduler.init(null);
            }
        } catch (Throwable e) {
            log.error("An error occurred while executing the bundle activator method!", e);
        }
    }
View Full Code Here

Examples of org.apache.synapse.task.TaskScheduler

        }

        /**
         * Initializing the Task Scheduler
         */
        TaskScheduler taskScheduler = (TaskScheduler) configurationContext.getProperty(
                TaskSchedulerConstants.CARBON_TASK_SCHEDULER);
        if (taskScheduler == null) {
            taskScheduler = new TaskScheduler(TaskManager.CARBON_TASK_SCHEDULER);
            taskScheduler.init(null);
            configurationContext.setProperty(
                    TaskSchedulerConstants.CARBON_TASK_SCHEDULER, taskScheduler);
        } else if (taskScheduler.isInitialized()) {
            taskScheduler.init(null);
        }

        /**
         * Initializing the Task Description Repository
         */
 
View Full Code Here

Examples of org.apache.synapse.task.TaskScheduler

    public static final java.lang.String CARBON_TASK_SCHEDULER = "CARBON_TASK_SCHEDULER";
    public static final java.lang.String CARBON_TASK_REPOSITORY = "CARBON_TASK_REPOSITORY";

    public void createdConfigurationContext(ConfigurationContext configContext) {
        TaskScheduler scheduler = (TaskScheduler)configContext.getProperty(SystemHostObjectInitializer.CARBON_TASK_SCHEDULER);
        if (scheduler == null) {
            scheduler = new TaskScheduler(TaskConstants.TASK_SCHEDULER);
            scheduler.init(null);
            configContext.setProperty(SystemHostObjectInitializer.CARBON_TASK_SCHEDULER, scheduler);
        } else if(!scheduler.isInitialized()) {
            scheduler.init(null);
        }

        if (configContext.getProperty(SystemHostObjectInitializer.CARBON_TASK_REPOSITORY) == null) {
            TaskDescriptionRepository repository = new TaskDescriptionRepository();
            configContext.setProperty(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.