Examples of Queue


Examples of org.b3log.latke.taskqueue.Queue

    @Override
    public Queue getQueue(final String queueName) {
        final com.google.appengine.api.taskqueue.Queue queue = QueueFactory.getQueue(queueName);

        return new Queue() {

            @Override
            public TaskHandle add(final Task task) {
                final TaskOptions taskOptions = TaskOptions.Builder.withTaskName(task.getName()).url(task.getURL());
                final HTTPRequestMethod requestMethod = task.getRequestMethod();
View Full Code Here

Examples of org.chaidb.db.helper.Queue

        //this.lastTxnId = TXN_MINIMUM;
        loadEnvironment();

        txnChain = new Hashtable(maxTxns);
        freePool = new Queue();

        /* Initialize lastCkp Lsn to 'zero'. */
        lastCkp = new Lsn(LogManager.FIRSTREC_LSN);


View Full Code Here

Examples of org.drools.core.util.Queue

public class BinaryHeapPriorityQueueTest extends TestCase {
    public void testOptimised() {
        final Random random = new Random();
        final List items = new LinkedList();

        final Queue queue = new BinaryHeapQueue( NaturalComparator.INSTANCE,
                                                 100000 );

        for ( int i = 0; i < 100000; ++i ) {
            items.add( new LongQueueable( queue, random.nextLong() ) );
        }

        final long startEnqueue = System.currentTimeMillis();

        for ( final Iterator i = items.iterator(); i.hasNext(); ) {
            queue.enqueue( (Queueable) i.next() );
        }

        final long elapsedEnqueue = System.currentTimeMillis() - startEnqueue;

        final long startDequeue = System.currentTimeMillis();
View Full Code Here

Examples of org.eclipse.core.internal.utils.Queue

  }

  protected void initializeQueue() {
    //initialize the queue
    if (queue == null)
      queue = new Queue(100, false);
    else
      queue.reset();
    //initialize the free nodes list
    if (freeNodes == null)
      freeNodes = new ArrayList(100);
View Full Code Here

Examples of org.hornetq.core.server.Queue

      if (binding == null)
      {
         throw new HornetQException(HornetQException.QUEUE_DOES_NOT_EXIST, "No such queue " + queueName);
      }

      Queue queue = (Queue)binding.getBindable();
     
      if (queue.getPageSubscription() != null)
      {
         queue.getPageSubscription().close();
      }

      if (queue.getConsumerCount() != 0)
      {
         throw new HornetQException(HornetQException.ILLEGAL_STATE, "Cannot delete queue " + queue.getName() +
                                                                    " on binding " +
                                                                    queueName +
                                                                    " - it has consumers = " +
                                                                    binding.getClass().getName());
      }

      if (session != null)
      {
         if (queue.isDurable())
         {
            // make sure the user has privileges to delete this queue
            securityStore.check(binding.getAddress(), CheckType.DELETE_DURABLE_QUEUE, session);
         }
         else
         {
            securityStore.check(binding.getAddress(), CheckType.DELETE_NON_DURABLE_QUEUE, session);
         }
      }

      queue.deleteAllReferences();

      if (queue.isDurable())
      {
         storageManager.deleteQueueBinding(queue.getID());
      }

      postOffice.removeBinding(queueName);
   }
View Full Code Here

Examples of org.ictclas4j.bean.Queue

      for (int i = 0; i < pathWeight.length; i++)
        for (int j = 0; j < pathWeight[i].length; j++)
          pathWeight[i][j] = Utility.INFINITE_VALUE;

      for (int i = 0; i < vertex; i++) {
        parent[i] = new Queue();
      }
    }
  }
View Full Code Here

Examples of org.izi.async.Queue

   private MainContainer container;

   @Bean @Qualifier("uiQueue")
   Queue uiQueue()
   {
      return new Queue("uiQueue", new EDTSynchronizer());
   }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.messaging.model.Queue

        if(response.hasDefined("jms-queue")) {
            List<Property> propList = response.get("jms-queue").asPropertyList();

            for(Property prop : propList)
            {
                Queue queue = factory.queue().as();
                queue.setName(prop.getName());

                ModelNode propValue = prop.getValue();
                String jndi = propValue.get("entries").asList().get(0).asString();
                queue.setJndiName(jndi);

                if(propValue.hasDefined("durable"))
                    queue.setDurable(propValue.get("durable").asBoolean());

                if(propValue.hasDefined("selector"))
                    queue.setSelector(propValue.get("selector").asString());

                queues.add(queue);
            }
        }
View Full Code Here

Examples of org.jboss.messaging.core.Queue

               DeliveryRecovery info = (DeliveryRecovery)iter2.next();
              
               ids.add(new Long(info.getMessageID()));
            }
           
            Queue queue = binding.getQueue();
           
            JMSCondition cond = (JMSCondition)binding.getCondition();                       
           
            ManagedDestination dest =
               sp.getDestinationManager().getDestination(cond.getName(), cond.isQueue());
           
            if (dest == null)
            {
               throw new IllegalStateException("Cannot find managed destination with name " +
                  cond.getName() + " isQueue" + cond.isQueue());
            }
           
            Queue dlqToUse =
               dest.getDLQ() == null ? defaultDLQ : dest.getDLQ();
           
            Queue expiryQueueToUse =
               dest.getExpiryQueue() == null ? defaultExpiryQueue : dest.getExpiryQueue();
           
            List dels = queue.recoverDeliveries(ids);
           
            Iterator iter2 = dels.iterator();
View Full Code Here

Examples of org.jboss.messaging.core.contract.Queue

         Iterator iter = queues.iterator();

         while (iter.hasNext())
         {
           Queue queue = (Queue)iter.next();

           if (!localOnly || (queue.getNodeID() == thisNodeID))
           {
             list.add(queue);
           }
         }
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.