Class ImmutableStoreState.Builder

java.lang.Object
io.resys.hdes.client.api.ImmutableStoreState.Builder
Enclosing class:
ImmutableStoreState

@NotThreadSafe public static final class ImmutableStoreState.Builder extends Object
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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder from(HdesStore.StoreState instance)
      Fill a builder with attribute values from the provided StoreState instance. 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:
      this builder for use in a chained invocation
    • tagName

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder tagName(String tagName)
      Initializes the value for the tagName attribute.
      Parameters:
      tagName - The value for tagName
      Returns:
      this builder for use in a chained invocation
    • commitId

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder commitId(@Nullable String commitId)
      Initializes the value for the commitId attribute.
      Parameters:
      commitId - The value for commitId (can be null)
      Returns:
      this builder for use in a chained invocation
    • commitAt

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder commitAt(@Nullable LocalDateTime commitAt)
      Initializes the value for the commitAt attribute.
      Parameters:
      commitAt - The value for commitAt (can be null)
      Returns:
      this builder for use in a chained invocation
    • putBranches

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putBranches(String key, HdesStore.StoreEntity value)
      Put one entry to the branches map.
      Parameters:
      key - The key in the branches map
      value - The associated value in the branches map
      Returns:
      this builder for use in a chained invocation
    • putBranches

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putBranches(Map.Entry<String,? extends HdesStore.StoreEntity> entry)
      Put one entry to the branches map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder 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 the branches map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the branches map
      Returns:
      this builder 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 to branches map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the branches map
      Returns:
      this builder for use in a chained invocation
    • putTags

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putTags(String key, HdesStore.StoreEntity value)
      Put one entry to the tags map.
      Parameters:
      key - The key in the tags map
      value - The associated value in the tags map
      Returns:
      this builder for use in a chained invocation
    • putTags

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putTags(Map.Entry<String,? extends HdesStore.StoreEntity> entry)
      Put one entry to the tags map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder 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 the tags map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the tags map
      Returns:
      this builder 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 to tags map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the tags map
      Returns:
      this builder for use in a chained invocation
    • putFlows

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putFlows(String key, HdesStore.StoreEntity value)
      Put one entry to the flows map.
      Parameters:
      key - The key in the flows map
      value - The associated value in the flows map
      Returns:
      this builder for use in a chained invocation
    • putFlows

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putFlows(Map.Entry<String,? extends HdesStore.StoreEntity> entry)
      Put one entry to the flows map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder 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 the flows map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the flows map
      Returns:
      this builder 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 to flows map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the flows map
      Returns:
      this builder for use in a chained invocation
    • putServices

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putServices(String key, HdesStore.StoreEntity value)
      Put one entry to the services map.
      Parameters:
      key - The key in the services map
      value - The associated value in the services map
      Returns:
      this builder for use in a chained invocation
    • putServices

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putServices(Map.Entry<String,? extends HdesStore.StoreEntity> entry)
      Put one entry to the services map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder 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 the services map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the services map
      Returns:
      this builder 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 to services map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the services map
      Returns:
      this builder for use in a chained invocation
    • putDecisions

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putDecisions(String key, HdesStore.StoreEntity value)
      Put one entry to the decisions map.
      Parameters:
      key - The key in the decisions map
      value - The associated value in the decisions map
      Returns:
      this builder for use in a chained invocation
    • putDecisions

      @CanIgnoreReturnValue public final ImmutableStoreState.Builder putDecisions(Map.Entry<String,? extends HdesStore.StoreEntity> entry)
      Put one entry to the decisions map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder 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 the decisions map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the decisions map
      Returns:
      this builder 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 to decisions map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the decisions map
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableStoreState build()
      Builds a new ImmutableStoreState.
      Returns:
      An immutable instance of StoreState
      Throws:
      IllegalStateException - if any required attributes are missing