Package com.alibaba.otter.canal.protocol.position

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


        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

        }

        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

        });
    }

    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

TOP

Related Classes of com.alibaba.otter.canal.protocol.position.PositionRange

Copyright © 2018 www.massapicom. 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.