
com.alicloud.openservices.tablestore.writer.dispatch.BaseDispatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tablestore Show documentation
Show all versions of tablestore Show documentation
Aliyun Open Services SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有
(C)阿里云计算有限公司 http://www.aliyun.com
package com.alicloud.openservices.tablestore.writer.dispatch;
import java.util.concurrent.atomic.AtomicLong;
public abstract class BaseDispatcher implements Dispatcher {
private final AtomicLong[] bucketDispatchRowCount;
public BaseDispatcher(int bucketCount) {
bucketDispatchRowCount = new AtomicLong[bucketCount];
for (int i = 0; i < bucketCount; i++) {
bucketDispatchRowCount[i] = new AtomicLong(0);
}
}
protected void addBucketCount(int bucketId) {
bucketDispatchRowCount[bucketId].incrementAndGet();
}
/**
* 分桶写入统计
* */
public AtomicLong[] getBucketDispatchRowCount() {
return bucketDispatchRowCount;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy