All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alicloud.openservices.tablestore.timeserieswriter.dispatch.TimeseriesBaseDispatcher Maven / Gradle / Ivy

Go to download

Aliyun Open Services SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com

The newest version!
package com.alicloud.openservices.tablestore.timeserieswriter.dispatch;

import java.util.concurrent.atomic.AtomicLong;


public abstract class TimeseriesBaseDispatcher implements TimeseriesDispatcher {
    private final AtomicLong[] bucketDispatchRowCount;

    public TimeseriesBaseDispatcher(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();
    }


    /**
     * Bucket writing statistics
     */
    public AtomicLong[] getBucketDispatchRowCount() {
        return bucketDispatchRowCount;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy