Class RPCInvokeOptions.Builder

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

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

    • addLockAttributeMapInstance

      public RPCInvokeOptions.Builder addLockAttributeMapInstance(AttributeMap<?> definition, String instance)
      Adds an invocation-time lock for one Attribute-map instance.

      The lock does not load the instance. Add the same instance through addLoadAttributeMapInstance(AttributeMap, String) when the handler reads or writes its current value.

      Parameters:
      definition - the Attribute map registered by the RPC's Flow
      instance - the nonblank instance name; slash is prohibited
      Returns:
      this builder
      Throws:
      NullPointerException - if definition is null
      IllegalArgumentException - if instance is invalid
    • addLoadAttributeMapInstance

      public RPCInvokeOptions.Builder addLoadAttributeMapInstance(AttributeMap<?> definition, String instance)
      Adds an exact Attribute-map instance load for one RPC invocation.
      Parameters:
      definition - the Attribute map registered by the RPC's Flow
      instance - the nonblank instance name; slash is prohibited
      Returns:
      this builder
      Throws:
      NullPointerException - if definition is null
      IllegalArgumentException - if instance is invalid
    • addLoadChannelMapInstance

      public RPCInvokeOptions.Builder addLoadChannelMapInstance(ChannelMap<?> definition, String instance)
      Adds an exact Channel-map instance load for one RPC invocation.
      Parameters:
      definition - the Channel map registered by the RPC's Flow
      instance - the nonblank instance name; slash is prohibited
      Returns:
      this builder
      Throws:
      NullPointerException - if definition is null
      IllegalArgumentException - if instance is invalid
    • build

      public RPCInvokeOptions build()
      Creates immutable invocation options.
      Returns:
      the configured options