Class HierarchicalPartitioningDescriptionBuilder
java.lang.Object
com.activeviam.tech.partitioning.api.builder.PartitioningDescriptionBuilder
com.activeviam.tech.partitioning.api.builder.HierarchicalPartitioningDescriptionBuilder
public final class HierarchicalPartitioningDescriptionBuilder
extends PartitioningDescriptionBuilder
Build a
HierarchicalPartitioningDescription.- Author:
- ActiveViam
-
Constructor Summary
ConstructorsConstructorDescriptionHierarchicalPartitioningDescriptionBuilder(PartitioningDescriptionBuilder srcDesc, List<String> availableKeyFields) Constructor used when converting apartitioning descriptioninto that of a hierarchical partitioning.HierarchicalPartitioningDescriptionBuilder(List<String> availableKeyFields) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionaddSubPartitioning(String field, IPartitioningFunctionDescription function) Adds a new partitioning function over a partitioning field.build()Builds the partitioning description.Begins defining the description of the root node of the hierarchy, without a parent builder.<ParentBuilderT>
PartitioningNodeDescriptionBuilder<ParentBuilderT> withRootNode(Supplier<ParentBuilderT> resultConsumer) Begins defining the description of the root node of the hierarchy, with a parent builder that can be reached via a consumer.
-
Constructor Details
-
HierarchicalPartitioningDescriptionBuilder
Constructor. -
HierarchicalPartitioningDescriptionBuilder
public HierarchicalPartitioningDescriptionBuilder(PartitioningDescriptionBuilder srcDesc, List<String> availableKeyFields) Constructor used when converting apartitioning descriptioninto that of a hierarchical partitioning.
-
-
Method Details
-
build
Description copied from class:PartitioningDescriptionBuilderBuilds the partitioning description.- Overrides:
buildin classPartitioningDescriptionBuilder- Returns:
- the
partitioning description
-
withRootNode
public PartitioningNodeDescriptionBuilder<HierarchicalPartitioningDescriptionBuilder> withRootNode()Begins defining the description of the root node of the hierarchy, without a parent builder.- Returns:
- the builder for the root node
-
withRootNode
public <ParentBuilderT> PartitioningNodeDescriptionBuilder<ParentBuilderT> withRootNode(Supplier<ParentBuilderT> resultConsumer) Begins defining the description of the root node of the hierarchy, with a parent builder that can be reached via a consumer.- Type Parameters:
ParentBuilderT- the type of the parent builder- Parameters:
resultConsumer- the result consumer- Returns:
- the builder for the root node
-
addSubPartitioning
public HierarchicalPartitioningDescriptionBuilder addSubPartitioning(String field, IPartitioningFunctionDescription function) Description copied from class:PartitioningDescriptionBuilderAdds a new partitioning function over a partitioning field.- Overrides:
addSubPartitioningin classPartitioningDescriptionBuilder- Parameters:
field- the partitioning fieldfunction- the partitioning function- Returns:
- this builder for chaining
-