Examples of Queue


Examples of com.lti.utils.collections.Queue

        else
          tracks = new PullSourceStreamTrack[] {videoTrack};

        packetQueues = new Queue[formatCtx.nb_streams];
        for (int i = 0; i < packetQueues.length; ++i)
          packetQueues[i] = new Queue();
       
    }
     
    super.open();
   
View Full Code Here

Examples of com.softwaremill.common.sqs.Queue

        return sqs;
    }

    @Timeout
    public void timeout(javax.ejb.Timer timer) {
        Queue queue = getSQS().getQueueByName(TASK_SQS_QUEUE);
        Optional<ReceivedMessage> sqsAnswer = queue.receiveSingleMessage();

        if (sqsAnswer.isPresent()) {
            Object message = sqsAnswer.get().getMessage();

            if (message instanceof OneTimeTask) {
                LOG.debug("Deserialized message: " + message);
                OneTimeTask task = (OneTimeTask) message;
                try {
                    if (task.getTaskTimeout() != null) {
                        queue.setMessageVisibilityTimeout(sqsAnswer.get(), task.getTaskTimeout());
                    }

                    new ExecuteWithRequestContext(task).execute();

                    queue.deleteMessage(sqsAnswer.get());
                } catch (RuntimeException e) {
                    LOG.warn("Something went wrong and the task has not been executed. Redelivery will occur.", e);
                }
            } else {
                LOG.warn("Trash in SQS: " + TASK_SQS_QUEUE);
                LOG.warn("Deserialized message: " + message + " -- removing message from queue!");
                queue.deleteMessage(sqsAnswer.get());
            }
        }

        LOG.debug("SQS task queue checked " + TASK_SQS_QUEUE);
    }
View Full Code Here

Examples of com.sun.messaging.Queue

            Reference ref = (Reference)obj;
            String refClassName;
            refClassName = ref.getClassName();
            Destination destObj = null;
            if (refClassName.equals(com.sun.messaging.Queue.class.getName())) {
                destObj = new Queue();
            } else {
                if (refClassName.equals(com.sun.messaging.Topic.class.getName())) {
                    destObj = new Topic();
                } else {
                    throw new MissingVersionNumberException();
View Full Code Here

Examples of com.twilio.sdk.resource.instance.Queue

    /**
     * {@inheritDoc}
     */
    @Override
    protected Queue makeNew(TwilioRestClient client, Map<String, Object> params) {
        return new Queue(client, params);
    }
View Full Code Here

Examples of dataStructure.Queue

      clear();
      constraints = null;
    }
    cleared = true;
    queue = null;
    clearQueue = new Queue();
    root = new PQNode();
    if (initLeaves)
    {
      leaves = new Vector();
    }
View Full Code Here

Examples of docs.actor.fsm.Events.Queue

      final ActorRef buncher =
        system.actorOf(Props.create(Buncher.class));
      final ActorRef probe = getRef();

      buncher.tell(new SetTarget(probe), probe);
      buncher.tell(new Queue(42), probe);
      buncher.tell(new Queue(43), probe);
      LinkedList<Object> list1 = new LinkedList<>();
      list1.add(42);
      list1.add(43);
      expectMsgEquals(new Batch(list1));
      buncher.tell(new Queue(44), probe);
      buncher.tell(Flush, probe);
      buncher.tell(new Queue(45), probe);
      LinkedList<Object> list2 = new LinkedList<>();
      list2.add(44);
      expectMsgEquals(new Batch(list2));
      LinkedList<Object> list3 = new LinkedList<>();
      list3.add(45);
View Full Code Here

Examples of edu.cmu.cs.stage3.alice.core.Queue

public abstract class QueueBooleanQuestion extends edu.cmu.cs.stage3.alice.core.question.BooleanQuestion {
  public final QueueProperty queue = new QueueProperty( this, "queue", null );
  protected abstract boolean getValue( Queue queue );
  public Object getValue() {
    Queue queueValue = queue.getQueueValue();
    if( queueValue!=null ) {
            if( getValue( queueValue ) ) {
                return Boolean.TRUE;
            } else {
                return Boolean.FALSE;
View Full Code Here

Examples of edu.emory.mathcs.backport.java.util.Queue

            info.setCommandId(commandId);

            transport.onCommand(info);
        }
       
        Queue exceptions = listener.getExceptions();
        Queue commands = listener.getCommands();
        if (expected) {
            if (!exceptions.isEmpty()) {
                Exception e = (Exception) exceptions.remove();
                e.printStackTrace();
                fail("Caught exception: " + e);
            }
            assertEquals("number of messages received", expectedCount, commands.size());
           
            assertEquals("Should have no buffered commands", 0, transport.getBufferedCommandCount());
                   }
        else {
            assertTrue("Should have received an exception!", exceptions.size() > 0);
View Full Code Here

Examples of fr.dyade.aaa.common.Queue

    sessPool = sessionPool;
    cnx = connection;
    maxMsgs = maxMessages;
    msgDispatcher = new MessageDispatcher(
        "MessageDispatcher[" + reqMultiplexer.getDemultiplexerDaemonName() + ']');
    repliesIn = new Queue();
    msgDispatcher.setDaemon(true);
    msgDispatcher.start();
  }
View Full Code Here

Examples of hudson.model.Queue

            // doing this early allows InitStrategy to set environment upfront
            final InitStrategy is = InitStrategy.get(Thread.currentThread().getContextClassLoader());

            Trigger.timer = new Timer("Jenkins cron thread");
            queue = new Queue(CONSISTENT_HASH?LoadBalancer.CONSISTENT_HASH:LoadBalancer.DEFAULT);

            try {
                dependencyGraph = DependencyGraph.EMPTY;
            } catch (InternalError e) {
                if(e.getMessage().contains("window server")) {
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.