Examples of TaskQueue


Examples of com.stratio.cassandra.index.util.TaskQueue

                                           config.getRamBufferMB(),
                                           config.getMaxMergeMB(),
                                           config.getMaxCachedMB(),
                                           schema.analyzer());

        this.indexQueue = new TaskQueue(config.getIndexingThreads(), config.getIndexingQueuesSize());
    }
View Full Code Here

Examples of com.sun.sgs.kernel.TaskQueue

            identity = defaultTaskOwner;
        }

        // TODO this implementation will not work in multinode
        synchronized(taskQueues) {
            TaskQueue queue = taskQueues.get(queueOwner);
            if (queue==null) {
                queue = transactionScheduler.createTaskQueue();
                taskQueues.put(queueOwner, queue);
            }
            queue.addTask(task, identity);
        }
    }
View Full Code Here

Examples of com.sun.sgs.kernel.TaskQueue

        logger.log(Level.FINEST, "serviceEventQueue sessionId:{0}",
             HexDumper.toHexString(sessionId));
    }

    BigInteger sessionRefId = new BigInteger(1, sessionId);
    TaskQueue taskQueue = sessionTaskQueues.get(sessionRefId);
    if (taskQueue == null) {
        TaskQueue newTaskQueue =
      transactionScheduler.createTaskQueue();
        taskQueue = sessionTaskQueues.
      putIfAbsent(sessionRefId, newTaskQueue);
        if (taskQueue == null) {
      taskQueue = newTaskQueue;
View Full Code Here

Examples of com.sun.sgs.kernel.TaskQueue

    private void flushTasks(
  BigInteger channelRefId, List<KernelRunnable> taskList)
 
    {
        assert Thread.holdsLock(contextList);
  TaskQueue taskQueue = channelTaskQueues.get(channelRefId);
  if (taskQueue == null) {
      taskQueue = taskScheduler.createTaskQueue();
      channelTaskQueues.put(channelRefId, taskQueue);
  }
  for (KernelRunnable task : taskList) {
      taskQueue.addTask(task, taskOwner);
  }
    }
View Full Code Here

Examples of com.sun.sgs.kernel.TaskQueue

        logger.log(
      Level.FINEST, "serviceEventQueue channelId:{0}",
      HexDumper.toHexString(channelRefId.toByteArray()));
    }

    TaskQueue taskQueue = coordinatorTaskQueues.get(channelRefId);
    if (taskQueue == null) {
        TaskQueue newTaskQueue =
      transactionScheduler.createTaskQueue();
        taskQueue = coordinatorTaskQueues.
      putIfAbsent(channelRefId, newTaskQueue);
        if (taskQueue == null) {
      taskQueue = newTaskQueue;
View Full Code Here

Examples of org.apache.archiva.redback.components.taskqueue.TaskQueue

        throws JobExecutionException
    {
        JobDataMap dataMap = context.getJobDetail().getJobDataMap();
        setJobDataMap( dataMap );

        TaskQueue taskQueue = (TaskQueue) dataMap.get( DefaultRepositoryArchivaTaskScheduler.TASK_QUEUE );

        String repositoryId = (String) dataMap.get( DefaultRepositoryArchivaTaskScheduler.TASK_REPOSITORY );
        RepositoryTask task = new RepositoryTask();
        task.setRepositoryId( repositoryId );

        try
        {
            taskQueue.put( task );
        }
        catch ( TaskQueueException e )
        {
            throw new JobExecutionException( e );
        }
View Full Code Here

Examples of org.apache.tomcat.util.threads.TaskQueue

    }


    public void createExecutor() {
        internalExecutor = true;
        TaskQueue taskqueue = new TaskQueue();
        TaskThreadFactory tf = new TaskThreadFactory(getName() + "-exec-", daemon, getThreadPriority());
        executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), 60, TimeUnit.SECONDS,taskqueue, tf);
        taskqueue.setParent( (ThreadPoolExecutor) executor);
    }
View Full Code Here

Examples of org.apache.tomcat.util.threads.TaskQueue

                    }
                    if (tpe.isTerminating()) {
                        getLog().warn(sm.getString("endpoint.warn.executorShutdown", getName()));
                    }
                }
                TaskQueue queue = (TaskQueue) tpe.getQueue();
                queue.setParent(null);
            }
            executor = null;
        }
    }
View Full Code Here

Examples of org.apache.tomcat.util.threads.TaskQueue

    }


    public void createExecutor() {
        internalExecutor = true;
        TaskQueue taskqueue = new TaskQueue();
        TaskThreadFactory tf = new TaskThreadFactory(getName() + "-exec-", daemon, getThreadPriority());
        executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), 60, TimeUnit.SECONDS,taskqueue, tf);
        taskqueue.setParent( (ThreadPoolExecutor) executor);
    }
View Full Code Here

Examples of org.apache.tomcat.util.threads.TaskQueue

        if ( executor!=null && internalExecutor ) {
            if ( executor instanceof ThreadPoolExecutor ) {
                //this is our internal one, so we need to shut it down
                ThreadPoolExecutor tpe = (ThreadPoolExecutor) executor;
                tpe.shutdownNow();
                TaskQueue queue = (TaskQueue) tpe.getQueue();
                queue.setParent(null);
            }
            executor = null;
        }
    }
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.