Package io.resys.hdes.client.api
Class ImmutableStoreState.Builder
java.lang.Object
io.resys.hdes.client.api.ImmutableStoreState.Builder
- Enclosing class:
- ImmutableStoreState
Builds instances of type
ImmutableStoreState.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbranches(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for thebranchesmap.build()Builds a newImmutableStoreState.commitAt(LocalDateTime commitAt) Initializes the value for thecommitAtattribute.Initializes the value for thecommitIdattribute.decisions(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for thedecisionsmap.flows(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for theflowsmap.from(HdesStore.StoreState instance) Fill a builder with attribute values from the providedStoreStateinstance.putAllBranches(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries tobranchesmap.putAllDecisions(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries todecisionsmap.putAllFlows(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries toflowsmap.putAllServices(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries toservicesmap.putAllTags(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries totagsmap.putBranches(String key, HdesStore.StoreEntity value) Put one entry to thebranchesmap.putBranches(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to thebranchesmap.putDecisions(String key, HdesStore.StoreEntity value) Put one entry to thedecisionsmap.putDecisions(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to thedecisionsmap.putFlows(String key, HdesStore.StoreEntity value) Put one entry to theflowsmap.putFlows(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to theflowsmap.putServices(String key, HdesStore.StoreEntity value) Put one entry to theservicesmap.putServices(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to theservicesmap.putTags(String key, HdesStore.StoreEntity value) Put one entry to thetagsmap.putTags(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to thetagsmap.services(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for theservicesmap.Initializes the value for thetagNameattribute.tags(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for thetagsmap.
-
Method Details
-
from
Fill a builder with attribute values from the providedStoreStateinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
tagName
Initializes the value for thetagNameattribute.- Parameters:
tagName- The value for tagName- Returns:
thisbuilder for use in a chained invocation
-
commitId
Initializes the value for thecommitIdattribute.- Parameters:
commitId- The value for commitId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
commitAt
@CanIgnoreReturnValue public final ImmutableStoreState.Builder commitAt(@Nullable LocalDateTime commitAt) Initializes the value for thecommitAtattribute.- Parameters:
commitAt- The value for commitAt (can benull)- Returns:
thisbuilder for use in a chained invocation
-
putBranches
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putBranches(String key, HdesStore.StoreEntity value) Put one entry to thebranchesmap.- Parameters:
key- The key in the branches mapvalue- The associated value in the branches map- Returns:
thisbuilder for use in a chained invocation
-
putBranches
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putBranches(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to thebranchesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
branches
@CanIgnoreReturnValue public final ImmutableStoreState.Builder branches(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for thebranchesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the branches map- Returns:
thisbuilder for use in a chained invocation
-
putAllBranches
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putAllBranches(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries tobranchesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the branches map- Returns:
thisbuilder for use in a chained invocation
-
putTags
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putTags(String key, HdesStore.StoreEntity value) Put one entry to thetagsmap.- Parameters:
key- The key in the tags mapvalue- The associated value in the tags map- Returns:
thisbuilder for use in a chained invocation
-
putTags
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putTags(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to thetagsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
tags
@CanIgnoreReturnValue public final ImmutableStoreState.Builder tags(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for thetagsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the tags map- Returns:
thisbuilder for use in a chained invocation
-
putAllTags
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putAllTags(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries totagsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the tags map- Returns:
thisbuilder for use in a chained invocation
-
putFlows
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putFlows(String key, HdesStore.StoreEntity value) Put one entry to theflowsmap.- Parameters:
key- The key in the flows mapvalue- The associated value in the flows map- Returns:
thisbuilder for use in a chained invocation
-
putFlows
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putFlows(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to theflowsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
flows
@CanIgnoreReturnValue public final ImmutableStoreState.Builder flows(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for theflowsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the flows map- Returns:
thisbuilder for use in a chained invocation
-
putAllFlows
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putAllFlows(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries toflowsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the flows map- Returns:
thisbuilder for use in a chained invocation
-
putServices
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putServices(String key, HdesStore.StoreEntity value) Put one entry to theservicesmap.- Parameters:
key- The key in the services mapvalue- The associated value in the services map- Returns:
thisbuilder for use in a chained invocation
-
putServices
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putServices(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to theservicesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
services
@CanIgnoreReturnValue public final ImmutableStoreState.Builder services(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for theservicesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the services map- Returns:
thisbuilder for use in a chained invocation
-
putAllServices
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putAllServices(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries toservicesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the services map- Returns:
thisbuilder for use in a chained invocation
-
putDecisions
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putDecisions(String key, HdesStore.StoreEntity value) Put one entry to thedecisionsmap.- Parameters:
key- The key in the decisions mapvalue- The associated value in the decisions map- Returns:
thisbuilder for use in a chained invocation
-
putDecisions
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putDecisions(Map.Entry<String, ? extends HdesStore.StoreEntity> entry) Put one entry to thedecisionsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
decisions
@CanIgnoreReturnValue public final ImmutableStoreState.Builder decisions(Map<String, ? extends HdesStore.StoreEntity> entries) Sets or replaces all mappings from the specified map as entries for thedecisionsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the decisions map- Returns:
thisbuilder for use in a chained invocation
-
putAllDecisions
@CanIgnoreReturnValue public final ImmutableStoreState.Builder putAllDecisions(Map<String, ? extends HdesStore.StoreEntity> entries) Put all mappings from the specified map as entries todecisionsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the decisions map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableStoreState.- Returns:
- An immutable instance of StoreState
- Throws:
IllegalStateException- if any required attributes are missing
-