Class FlowConfig.Builder

java.lang.Object
io.superdurable.dex.FlowConfig.Builder
Enclosing class:
FlowConfig

public static final class FlowConfig.Builder extends Object
Builds immutable FlowConfig values.
  • Method Details

    • activeStepSearchMode

      public FlowConfig.Builder activeStepSearchMode(ActiveStepSearchMode value)
      Sets how precisely Dex indexes active Step types for later searches.

      The selected mode controls updates to the ActiveStepTypes search index. Use that index to find running Flows before renaming or removing a Step implementation.

      Parameters:
      value - the active-Step indexing mode, or null for the server default
      Returns:
      this builder
    • continueAsNewThreshold

      public FlowConfig.Builder continueAsNewThreshold(int value)
      Sets the history-event threshold that triggers continue-as-new.
      Parameters:
      value - the threshold count
      Returns:
      this builder
    • continueAsNewPageSizeBytes

      public FlowConfig.Builder continueAsNewPageSizeBytes(int value)
      Sets the history page-size threshold that triggers continue-as-new.
      Parameters:
      value - the page-size threshold in bytes
      Returns:
      this builder
    • stepDurability

      public FlowConfig.Builder stepDurability(StepDurability value)
      Sets the normal default durability for Step methods in this Flow.

      The server default is StepDurability.SYNC. A method-level setting in StepOptions takes precedence over this Flow-wide value. Failure policies do not change that ordering or the selected default.

      Parameters:
      value - the durability mode, or null for the server default
      Returns:
      this builder
    • attributeStoreNames

      public FlowConfig.Builder attributeStoreNames(List<String> value)
      Selects Server-configured Attribute Stores for enabled Attribute writes.

      Each enabled Attribute write is projected to every selected store. An empty list explicitly disables future projections, while omitting this call leaves the current or server-selected values unchanged. Already queued projections retain their original targets.

      Parameters:
      value - the Attribute Store names, an empty list to disable future projections, or null for the server default
      Returns:
      this builder
    • attributeStoreNames

      public FlowConfig.Builder attributeStoreNames(String... values)
      Selects Server-configured Attribute Stores for enabled Attribute writes.

      This overload is convenient when a Flow uses one or a few stores. Each enabled Attribute write is projected to every supplied store. Calling this method with no names explicitly disables future projections; omitting it leaves the current or server-selected values unchanged. Already queued projections retain their original targets.

      FlowConfig config = FlowConfig.newBuilder()
              .attributeStoreNames("profiles")
              .build();
      
      Parameters:
      values - the Attribute Store names; no names disables future projections
      Returns:
      this builder
    • build

      public FlowConfig build()
      Builds immutable Flow configuration from the current values.
      Returns:
      the configured Flow settings