目录

ReadOptions.Builder

Class Info

public static class Builder

Builder for ReadOptions.

Public Constructor Summary

Constructor Name

Builder()

Builder, which is used to create a ReadOptions.Builder object.

Public Method Summary

Qualifier and Type

Method Name and Description

ReadOptions

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

read(DataType dataType)

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.

Public Constructors

[h2]Builder()

Constructor

public Builder()

Builder, which is used to create a ReadOptions.Builder object.

Public Methods

[h2]build()

Method

public ReadOptions build()

Verifies the parameters as well as builds and returns the request.

Returns

Type

Description

ReadOptions

ReadOptions object.

[h2]groupByTime(int duration, TimeUnit timeUnit)

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.

[h2]polymerize(DataCollector dataCollector, DataType outputDataType)

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.

Parameters

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.

[h2]polymerize(DataType inputDataType, DataType outputDataType)

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.

[h2]read(DataCollector dataCollector)

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.

[h2]read(DataType dataType)

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.

[h2]setPageSize(int size)

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.

[h2]setTimeRange(long startTime, long endTime, TimeUnit timeUnit)

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.