Class Info |
|---|
public static class Builder Builder for ReadOptions. |
Constructor Name |
|---|
Builder() Builder, which is used to create a ReadOptions.Builder object. |
Qualifier and Type | Method Name and Description |
|---|---|
build() Builds and returns the instance. | |
ReadOptions.Builder | groupByTime(int duration, TimeUnit timeUnit) Sets the group type to groupByTime and sets the duration for each group. |
ReadOptions.Builder | polymerize(DataCollector dataCollector, DataType outputDataType) Adds a new data collector to the polymerized data and sets the type of the polymerized data to be returned. |
ReadOptions.Builder | polymerize(DataType inputDataType, DataType outputDataType) Adds a new data type to the polymerized data and sets the type of the polymerized data to be returned. |
ReadOptions.Builder | read(DataCollector dataCollector) Adds a data collector for reading data. |
ReadOptions.Builder | Adds a data type for reading data. |
ReadOptions.Builder | setPageSize(int size) Sets the maximum number of pages for the paginated query results. |
ReadOptions.Builder | setTimeRange(long startTime, long endTime, TimeUnit timeUnit) Sets the time range for reading data. |
Constructor |
|---|
public Builder() Builder, which is used to create a ReadOptions.Builder object. |
Method |
|---|
public ReadOptions build() Verifies the parameters as well as builds and returns the request. |
Returns
Type | Description |
|---|---|
ReadOptions object. |
Method |
|---|
public ReadOptions.Builder groupByTime(int duration, TimeUnit timeUnit) Sets the group type to groupByTime and sets the duration for each group. |
Parameters
Name | Description |
|---|---|
duration | Duration. |
timeUnit | Time unit. |
Returns
Type | Description |
|---|---|
ReadOptions.Builder | ReadOptions.Builder object. |
Method |
|---|
public ReadOptions.Builder polymerize(DataCollector dataCollector, DataType outputDataType) Adds a new data collector to the polymerized data and sets the type of the polymerized data to be returned. |
Parameter name | Parameter desc |
|---|---|
dataCollector | Data collector added. |
outputDataType | Type of the polymerized data to be returned. |
Returns
Type | Description |
|---|---|
ReadOptions.Builder | ReadOptions.Builder object. |
Method |
|---|
public ReadOptions.Builder polymerize(DataType inputDataType, DataType outputDataType) Adds a new data type to the polymerized data and sets the type of the polymerized data to be returned. |
Parameters
Name | Description |
|---|---|
inputDataType | Type of the data to be polymerized. |
outputDataType | Type of the polymerized data to be returned. |
Returns
Type | Description |
|---|---|
ReadOptions.Builder | ReadOptions.Builder object. |
Method |
|---|
public ReadOptions.Builder read(DataCollector dataCollector) Adds a data collector for reading data. |
Parameters
Name | Description |
|---|---|
dataCollector | Data collector for data reading. |
Returns
Type | Description |
|---|---|
ReadOptions.Builder | ReadOptions.Builder object. |
Method |
|---|
public ReadOptions.Builder read(DataType dataType) Adds a data type for reading data. |
Parameters
Name | Description |
|---|---|
dataType | Data type for data reading. |
Returns
Type | Description |
|---|---|
ReadOptions.Builder | ReadOptions.Builder object. |
Method |
|---|
public ReadOptions.Builder setPageSize(int size) Sets the maximum number of pages for the paginated query results. |
Parameters
Name | Description |
|---|---|
size | Upper number limit. |
Returns
Type | Description |
|---|---|
ReadOptions.Builder | ReadOptions.Builder object. |
Method |
|---|
public ReadOptions.Builder setTimeRange(long startTime, long endTime, TimeUnit timeUnit) Sets the time range for reading data in the specified time unit. |
1. The start time and end time must be later than the UNIX timestamp corresponding to 00:00 on January 1, 2014.
2. The UNIX timestamp of the end time must be later than that of the start time.
Parameters
Name | Description |
|---|---|
startTime | Start time. |
endTime | End time. |
timeUnit | Time unit. |
Returns
Type | Description |
|---|---|
ReadOptions.Builder | ReadOptions.Builder object. |