Class ReplicatedRegisterEntity<T>

Object
kalix.javasdk.replicatedentity.ReplicatedEntity<ReplicatedRegister<T>>
kalix.javasdk.replicatedentity.ReplicatedRegisterEntity<T>

public abstract class ReplicatedRegisterEntity<T> extends ReplicatedEntity<ReplicatedRegister<T>>
  • Constructor Details

    • ReplicatedRegisterEntity

      public ReplicatedRegisterEntity()
  • Method Details

    • emptyValue

      public abstract T emptyValue()
      Implement to set the default empty value for the register.
      Returns:
      the default empty value
    • emptyData

      public final ReplicatedRegister<T> emptyData(ReplicatedDataFactory factory)
      Description copied from class: ReplicatedEntity
      Implement by returning the initial empty replicated data object. This object will be passed into the command handlers.

      Also known as the "zero" or "neutral" state.

      The initial data cannot be null.

      Specified by:
      emptyData in class ReplicatedEntity<ReplicatedRegister<T>>
      Parameters:
      factory - the factory to create the initial empty replicated data object