
com.alicloud.openservices.tablestore.model.timeseries.ScanTimeseriesDataRequest 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.model.timeseries;
import com.alicloud.openservices.tablestore.core.utils.Pair;
import com.alicloud.openservices.tablestore.core.utils.Preconditions;
import com.alicloud.openservices.tablestore.model.ColumnType;
import com.alicloud.openservices.tablestore.model.OperationNames;
import com.alicloud.openservices.tablestore.model.Request;
import java.util.ArrayList;
import java.util.List;
public class ScanTimeseriesDataRequest implements Request {
private String timeseriesTableName;
private TimeseriesScanSplitInfo splitInfo;
private long beginTimeInUs = -1;
private long endTimeInUs = -1;
private List> fieldsToGet;
private int limit = -1;
private byte[] nextToken;
public ScanTimeseriesDataRequest(String timeseriesTableName) {
this.timeseriesTableName = timeseriesTableName;
}
@Override
public String getOperationName() {
return OperationNames.OP_SCAN_TIMESERIES_DATA;
}
public String getTimeseriesTableName() {
return timeseriesTableName;
}
public void setTimeseriesTableName(String timeseriesTableName) {
this.timeseriesTableName = timeseriesTableName;
}
public TimeseriesScanSplitInfo getSplitInfo() {
return splitInfo;
}
public void setSplitInfo(TimeseriesScanSplitInfo splitInfo) {
this.splitInfo = splitInfo;
}
public void setTimeRange(long beginTimeInUs, long endTimeInUs) {
Preconditions.checkArgument(beginTimeInUs >= 0, "begin time must be large than or equal to 0");
Preconditions.checkArgument(endTimeInUs > beginTimeInUs, "end time must be large than begin time");
this.beginTimeInUs = beginTimeInUs;
this.endTimeInUs = endTimeInUs;
}
public long getBeginTimeInUs() {
return beginTimeInUs;
}
public void setBeginTimeInUs(long beginTimeInUs) {
this.beginTimeInUs = beginTimeInUs;
}
public long getEndTimeInUs() {
return endTimeInUs;
}
public void setEndTimeInUs(long endTimeInUs) {
this.endTimeInUs = endTimeInUs;
}
public List> getFieldsToGet() {
if (fieldsToGet == null) {
fieldsToGet = new ArrayList>();
}
return fieldsToGet;
}
public void setFieldsToGet(List> fieldsToGet) {
this.fieldsToGet = fieldsToGet;
}
public void addFieldToGet(String fieldName, ColumnType fieldType) {
Preconditions.checkNotNull(fieldName);
Preconditions.checkNotNull(fieldType);
if (fieldsToGet == null) {
fieldsToGet = new ArrayList>();
}
fieldsToGet.add(new Pair(fieldName, fieldType));
}
public int getLimit() {
return limit;
}
public void setLimit(int limit) {
this.limit = limit;
}
public byte[] getNextToken() {
return nextToken;
}
public void setNextToken(byte[] nextToken) {
this.nextToken = nextToken;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy