Examples of QueueNode


Examples of org.apache.qpid.client.messaging.address.Node.QueueNode

                                          amqd.isExclusive() ? Option.EXCLUSIVE : Option.NONE,
                                          passive ? Option.PASSIVE : Option.NONE);
        }
        else
        {
            QueueNode node = (QueueNode)amqd.getSourceNode();
            Map<String,Object> arguments = new HashMap<String,Object>();
            arguments.putAll((Map<? extends String, ? extends Object>) node.getDeclareArgs());
            if (arguments == null || arguments.get(AddressHelper.NO_LOCAL) == null)
            {
                arguments.put(AddressHelper.NO_LOCAL, noLocal);
            }
            getQpidSession().queueDeclare(queueName.toString(), node.getAlternateExchange() ,
                    arguments,
                    node.isAutoDelete() ? Option.AUTO_DELETE : Option.NONE,
                    node.isDurable() ? Option.DURABLE : Option.NONE,
                    node.isExclusive() ? Option.EXCLUSIVE : Option.NONE);  
        }

        // passive --> false
        if (!nowait)
        {
View Full Code Here

Examples of org.apache.qpid.client.messaging.address.Node.QueueNode

        }
    }
   
    private void createSubscriptionQueue(AMQDestination dest, boolean noLocal) throws AMQException
    {
        QueueNode node = (QueueNode)dest.getSourceNode()// source node is never null
       
        if (dest.getQueueName() == null)
        {
            if (dest.getLink() != null && dest.getLink().getName() != null)
            {
                dest.setQueueName(new AMQShortString(dest.getLink().getName()));
            }
        }
        node.setExclusive(true);
        node.setAutoDelete(!node.isDurable());
        send0_10QueueDeclare(dest,null,noLocal,true, false);
        getQpidSession().exchangeBind(dest.getQueueName(),
                          dest.getAddressName(),
                          dest.getSubject(),
                          Collections.<String,Object>emptyMap());
View Full Code Here

Examples of org.ictclas4j.bean.QueueNode

        for (SegNode seg : colSgs) {
          preNode = seg.getRow();
          weight = seg.getWeight();

          if (preNode == 0) {
            queWork.push(new QueueNode(preNode, 0, weight));

          } else {
            if (pathWeight[preNode][0] != Utility.INFINITE_VALUE)
              queWork.push(new QueueNode(preNode, 0, weight + pathWeight[preNode][0]));
          }

        }

        // ��¼ÿһ���ڵ��N��ǰ����Ȩ��
        QueueNode minNode = null;
        int pathIndex = 0;
        while ((minNode = queWork.pop()) != null && pathIndex < pathCount) {
          pathWeight[cur][pathIndex] = minNode.getWeight();
          parent[cur].push(minNode);
          logger.debug("pathWeight[" + cur + "][" + pathIndex + "]:" + pathWeight[cur][pathIndex]);
          logger.debug("parent[" + cur + "]:" + parent[cur]);
          pathIndex++;
        }
View Full Code Here

Examples of org.ictclas4j.bean.QueueNode

    shortPath();
    if (vertex > 0) {

      queResult = new Queue();
      queResult.push(new QueueNode(vertex - 1, 0, 0));
      curNode = vertex - 1;
      curIndex = 0;

      while (!queResult.isEmpty()) {
        while (curNode > 0) {
          // Get its parent and store them in nParentNode,nParentIndex
          QueueNode qn = parent[curNode].pop(false);
          if (qn == null)
            qn = parent[curNode].top();
          if (qn != null) {
            curNode = qn.getParent();
            curIndex = qn.getIndex();
          }
          else
            break;
          if (curNode > 0)
            queResult.push(new QueueNode(curNode, curIndex, 0));
        }

        if (curNode == 0) {
          // ���һ���ִ�·��
          QueueNode qn = null;
          onePath = new ArrayList<Integer>();
          onePath.add(curNode);
          while ((qn = queResult.pop(false)) != null)
            onePath.add(qn.getParent());
          result.add(onePath);
          queResult.resetIndex();
          pathIndex++;// Ѱ����һ���ζ�·��
          if (pathIndex == pathCount)
            break;

          // ����ҵ�����һ��ǰ���Ľڵ㣬����������ǰ��ѹ��ջ��
          while ((qn = queResult.pop()) != null) {
            curNode = qn.getParent();
            QueueNode next = parent[curNode].pop(false);

            if (next != null) {
              curNode = next.getParent();
              next.setWeight(0);
              queResult.push(qn);
              queResult.push(next);
              break;
            }
          }
View Full Code Here

Examples of org.ictclas4j.bean.QueueNode

        for (SegNode seg : colSgs) {
          preNode = seg.getRow();
          weight = seg.getValue();

          if (preNode == 0) {
            queWork.push(new QueueNode(preNode, 0, weight));

          } else {
            if (pathWeight[preNode][0] != Utility.INFINITE_VALUE)
              queWork.push(new QueueNode(preNode, 0, weight + pathWeight[preNode][0]));
          }

        }

        // ��¼ÿһ���ڵ��N��ǰ����Ȩ��
        QueueNode minNode = null;
        int pathIndex = 0;
        while ((minNode = queWork.pop()) != null && pathIndex < pathCount) {
          pathWeight[cur][pathIndex] = minNode.getWeight();
          parent[cur].push(minNode);
          logger.debug("pathWeight[" + cur + "][" + pathIndex + "]:" + pathWeight[cur][pathIndex]);
          logger.debug("parent[" + cur + "]:" + parent[cur]);
          pathIndex++;
        }
View Full Code Here

Examples of org.ictclas4j.bean.QueueNode

    shortPath();
    if (vertex > 0) {

      queResult = new Queue();
      queResult.push(new QueueNode(vertex - 1, 0, 0));
      curNode = vertex - 1;
      curIndex = 0;

      while (!queResult.isEmpty()) {
        while (curNode > 0) {
          // Get its parent and store them in nParentNode,nParentIndex
          QueueNode qn = parent[curNode].pop(false);
          if (qn == null)
            qn = parent[curNode].top();
          if (qn != null) {
            curNode = qn.getParent();
            curIndex = qn.getIndex();
          }
          if (curNode > 0)
            queResult.push(new QueueNode(curNode, curIndex, 0));
        }

        if (curNode == 0) {
          // ���һ���ִ�·��
          QueueNode qn = null;
          onePath = new ArrayList<Integer>();
          onePath.add(curNode);
          while ((qn = queResult.pop(false)) != null)
            onePath.add(qn.getParent());
          result.add(onePath);
          queResult.resetIndex();
          pathIndex++;// Ѱ����һ���ζ�·��
          if (pathIndex == pathCount)
            break;

          // ����ҵ�����һ��ǰ���Ľڵ㣬����������ǰ��ѹ��ջ��
          while ((qn = queResult.pop()) != null) {
            curNode = qn.getParent();
            QueueNode next = parent[curNode].pop(false);

            if (next != null) {
              curNode = next.getParent();
              next.setWeight(0);
              queResult.push(qn);
              queResult.push(next);
              break;
            }
          }
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.