Class JsonAggregateSerdes<K,​C,​E,​A>

  • All Implemented Interfaces:
    io.simplesource.kafka.api.AggregateSerdes<K,​C,​E,​A>, io.simplesource.kafka.api.CommandSerdes<K,​C>

    public final class JsonAggregateSerdes<K,​C,​E,​A>
    extends Object
    implements io.simplesource.kafka.api.AggregateSerdes<K,​C,​E,​A>
    • Field Detail

      • keyMapper

        protected final GenericMapper<K,​com.google.gson.JsonElement> keyMapper
      • commandMapper

        protected final GenericMapper<C,​com.google.gson.JsonElement> commandMapper
    • Constructor Detail

      • JsonAggregateSerdes

        public JsonAggregateSerdes()
      • JsonAggregateSerdes

        public JsonAggregateSerdes​(GenericMapper<K,​com.google.gson.JsonElement> keyMapper,
                                   GenericMapper<C,​com.google.gson.JsonElement> commandMapper,
                                   GenericMapper<E,​com.google.gson.JsonElement> eventMapper,
                                   GenericMapper<A,​com.google.gson.JsonElement> aggregateMapper)
    • Method Detail

      • aggregateKey

        public org.apache.kafka.common.serialization.Serde<K> aggregateKey()
        Specified by:
        aggregateKey in interface io.simplesource.kafka.api.CommandSerdes<K,​C>
      • commandRequest

        public org.apache.kafka.common.serialization.Serde<io.simplesource.kafka.model.CommandRequest<K,​C>> commandRequest()
        Specified by:
        commandRequest in interface io.simplesource.kafka.api.CommandSerdes<K,​C>
      • commandId

        public org.apache.kafka.common.serialization.Serde<io.simplesource.api.CommandId> commandId()
        Specified by:
        commandId in interface io.simplesource.kafka.api.CommandSerdes<K,​C>
      • valueWithSequence

        public org.apache.kafka.common.serialization.Serde<io.simplesource.kafka.model.ValueWithSequence<E>> valueWithSequence()
        Specified by:
        valueWithSequence in interface io.simplesource.kafka.api.AggregateSerdes<K,​C,​E,​A>
      • aggregateUpdate

        public org.apache.kafka.common.serialization.Serde<io.simplesource.kafka.model.AggregateUpdate<A>> aggregateUpdate()
        Specified by:
        aggregateUpdate in interface io.simplesource.kafka.api.AggregateSerdes<K,​C,​E,​A>
      • commandResponse

        public org.apache.kafka.common.serialization.Serde<io.simplesource.kafka.model.CommandResponse<K>> commandResponse()
        Specified by:
        commandResponse in interface io.simplesource.kafka.api.CommandSerdes<K,​C>