Examples of PositionRange


Examples of com.alibaba.otter.canal.protocol.position.PositionRange

        ArrayList<Long> batchIds = new ArrayList<Long>(nodes.size());
        for (String batchIdString : nodes) {
            batchIds.add(Long.valueOf(batchIdString));
        }
        Long maxBatchId = Collections.max(batchIds);
        PositionRange result = getBatch(clientIdentity, maxBatchId);
        if (result == null) { // 出现为null,说明zk节点有变化,重新获取
            return getLastestBatch(clientIdentity);
        } else {
            return result;
        }
View Full Code Here

Examples of com.alibaba.otter.canal.protocol.position.PositionRange

        ArrayList<Long> batchIds = new ArrayList<Long>(nodes.size());
        for (String batchIdString : nodes) {
            batchIds.add(Long.valueOf(batchIdString));
        }
        Long minBatchId = Collections.min(batchIds);
        PositionRange result = getBatch(clientIdentity, minBatchId);
        if (result == null) { // 出现为null,说明zk节点有变化,重新获取
            return getFirstBatch(clientIdentity);
        } else {
            return result;
        }
View Full Code Here

Examples of com.alibaba.otter.canal.protocol.position.PositionRange

        }

        Collections.sort(batchIds); // 从小到大排序
        Map<Long, PositionRange> positionRanges = Maps.newLinkedHashMap();
        for (Long batchId : batchIds) {
            PositionRange result = getBatch(clientIdentity, batchId);
            if (result == null) {// 出现为null,说明zk节点有变化,重新获取
                return listAllBatchs(clientIdentity);
            } else {
                positionRanges.put(batchId, result);
            }
View Full Code Here

Examples of com.alibaba.otter.canal.protocol.position.PositionRange

        });
    }

    public PositionRange removeBatch(final ClientIdentity clientIdentity, final Long batchId)
                                                                                             throws CanalMetaManagerException {
        PositionRange positionRange = super.removeBatch(clientIdentity, batchId);
        // 异步刷新
        executor.submit(new Runnable() {

            public void run() {
                zooKeeperMetaManager.removeBatch(clientIdentity, batchId);
View Full Code Here

Examples of org.allspice.util.PositionRange

    for(int i = 0; i < rule.rhs.size(); i++) {
      r = r.tail ;
    }
    Position end = currTokenPositionRange.end ;
    Position start = rule.rhs.isEmpty() ? end : state.reductions.head.range.start ;
    PositionRange range = new PositionRange(start,end);
    Object obj = parseTable.reduce(rule,this,state,range) ;
    r = new ParserStackEntry<StackObject>(new StackObject(obj,range),r) ;
    return r ;
  }
View Full Code Here

Examples of org.allspice.util.PositionRange

   */
  protected void advanceToken() throws SyntaxError {
    Position start = tokens.getPosition() ;
    currToken = tokens.next();
    Position end = tokens.getPosition() ;
    currTokenPositionRange = new PositionRange(start,end) ;
  }
View Full Code Here

Examples of org.allspice.util.PositionRange

  }

  protected <T extends CompiledItem> void _compile(TypeName forwardType,T inst,EvaluationContext context,InstList il) {
    try {
      ExprCompiler<T> tconv = getCompiler(inst) ;
      PositionRange range = inst.getPositionRange() ;
      if (range != null) {
        il.add(new Nop(range.start.lineno)) ;
      }
      tconv.compile(forwardType, inst, context, il) ;
    } catch (CompilerException e) {
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.