Package com.impetus.labs.korus.core.process

Examples of com.impetus.labs.korus.core.process.BaseProcess


   */
  public synchronized static void send(String processName, Message message)
  {

    // 1. Select process from registered process list
    BaseProcess process = getRegisteredProcess(processName);
    if (process == null)
    {
      System.out.println("Message sent to an unregistered Process: "
          + processName);
    } else
    {
      // 2. Put message in process's messageQueue
      process.putMessage(message);
      // 3. Put this Process in Scheduler's processQueue
      Scheduler.setProcess(process);
    }

  }
View Full Code Here


  public synchronized static void send(String processName, Message message,
      boolean isFirst)
  {

    // 1. Select process from registered process list
    BaseProcess process = getRegisteredProcess(processName);
    if (process == null)
    {
      System.out.println("Message sent to an unregistered Process: "
          + processName);
    } else
    {
      // 2. Put message in process's messageQueue
      process.putMessage(message);
      if (isFirst)
      {
        // 3. Put this Process in Scheduler's processQueue
        RequestScheduler.setProcess(process);
      } else
View Full Code Here

  public void run()
  {
    while (true)
    {
      // 1. Pick a Process
      BaseProcess process = getProcess();

      // 2. Select a RequestExecuter
      RequestExecuter requestExecuter = KorusRuntime
          .getNextRequestExecuter();
View Full Code Here

public class Scheduler extends Thread {

  public void run() {
    while (true) {
      // 1. Pick a Process
      BaseProcess process = getProcess();
      // 2. Select a Executer
      Executer executer = KorusRuntime.getNextExecuter();
      // 3. Set the process to the executer processQueue
      executer.setProcess(process);
    }
View Full Code Here

  public void run()
  {
    while (true)
    {
      // 1. Pick a Process
      BaseProcess process = getProcess();
      // 2. Execute the Process.
      process.service(process.getMessage());
    }
  }
View Full Code Here

  public void run()
  {
    while (true)
    {
      // 1. Pick a Process
      BaseProcess process = getProcess();
     
      //2. Execute the Process.
      process.service(process.getMessage());
     
    }
  }
View Full Code Here

   *            A task which is to execute parallel.
   */
  public void parallelFor(ParallelTask parallelTask)
  {
    // 1. Select process from registered process list
    BaseProcess process = KorusRuntime
        .getRegisteredProcess("_~_~_Parallel_~_Task_~_~_");
    if (process == null)
    {
      // Register Process with the name "ParallelTask"
      try {
View Full Code Here

   * @param name Name of the Pipeline task
   * @param pipelineTask Object of the PipelineTask
   */
  public void add(String name, PipelineTask pipelineTask) {
    // 1. Select process from registered process list
    BaseProcess process = KorusRuntime.getRegisteredProcess(name);
    if (process == null) {
      // Register Process with the name ParallelTask
      try {
        KorusRuntime.registerProcess(name, pipelineTask);
      } catch (ProcessAlreadyExistsException e) {
View Full Code Here

TOP

Related Classes of com.impetus.labs.korus.core.process.BaseProcess

Copyright © 2018 www.massapicom. 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.