Class IndexPartition.Builder
java.lang.Object
com.here.platform.data.client.javadsl.IndexPartition.Builder
- Enclosing class:
- IndexPartition
Builder of IndexPartition that represents a partition of Index layer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBooleanField(String name, boolean value) Add index field with Boolean type to the collection of index fields.addField(String name, IndexValue value) Add field to the collection of index fields.addHereTileField(String name, long tile) Add index field with HereTile type to the collection of index fields.addIntField(String name, long value) Add index field with 64 bits integer type to the collection of index fields.addMetadata(String name, String value) Add metadata name-value pair to index metadata collection.addStringField(String name, String value) Add index field with String type to the collection of index fields.addTimeWindowField(String name, long time) Add index field with TimeWindow type to the collection of index fields.build()Build index partition.withChecksum(Optional<String> checksum) Sets the checksum.withCompressedDataSize(OptionalLong compressedDataSize) Sets the compressedDataSize.Sets the crc.withDataHandle(String dataHandle) Sets the dataHandle.withDataSize(OptionalLong dataSize) Sets the dataSize.withFields(Optional<Map<String, IndexValue>> fields) Set the index fields.Sets the layer name.withMetadata(Optional<Map<String, String>> metadata) Sets the additional metadata.withTimestamp(OptionalLong timestamp) Sets the precomputed timestamp.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
addBooleanField
Add index field with Boolean type to the collection of index fields.- Parameters:
name- the name of index fieldvalue- the value of index field- Returns:
- this builder
-
addField
Add field to the collection of index fields.- Parameters:
name- the name of index fieldvalue- the value of index field- Returns:
- this builder
-
addHereTileField
Add index field with HereTile type to the collection of index fields.- Parameters:
name- the name of index fieldtile- the value of index field- Returns:
- this builder
-
addIntField
Add index field with 64 bits integer type to the collection of index fields.- Parameters:
name- the name of index fieldvalue- the value of index field- Returns:
- this builder
-
addMetadata
Add metadata name-value pair to index metadata collection.- Parameters:
name- name of metadata fieldvalue- value of metadata field- Returns:
- this builder
-
addStringField
Add index field with String type to the collection of index fields.- Parameters:
name- the name of index fieldvalue- the value of index field- Returns:
- this builder
-
addTimeWindowField
Add index field with TimeWindow type to the collection of index fields.- Parameters:
name- the name of index fieldtime- the value of index field- Returns:
- this builder
-
build
Build index partition. -
withChecksum
Sets the checksum.- Parameters:
checksum- precomputed checksum value- Returns:
- this builder
-
withCompressedDataSize
Sets the compressedDataSize.- Parameters:
compressedDataSize- compressed data size- Returns:
- this builder
-
withCrc
Sets the crc.- Parameters:
crc- precomputed crc value- Returns:
- this builder
-
withDataHandle
Sets the dataHandle.- Parameters:
dataHandle- dataHandle- Returns:
- this builder
-
withDataSize
Sets the dataSize.- Parameters:
dataSize- data size- Returns:
- this builder
-
withFields
Set the index fields.- Parameters:
fields- the index fields- Returns:
- this builder
- Note:
- The index fields are collection of name-value pairs
that are used to index new partition in Index layer.
, This method overwrites all fields added before.
-
withLayer
Sets the layer name.- Parameters:
layer- layer name- Returns:
- this builder
-
withMetadata
Sets the additional metadata.- Parameters:
metadata- the index metadata- Returns:
- this builder
- Note:
- This method overwrites all metadata values added before.
-
withTimestamp
Sets the precomputed timestamp.- Parameters:
timestamp- precomputed compressed data size- Returns:
- this builder
-