diff --git a/sample/src/main/java/com/trendyol/transmission/counter/Holder.kt b/sample/src/main/java/com/trendyol/transmission/counter/Holder.kt index 05a5d3b..3a8e4e2 100644 --- a/sample/src/main/java/com/trendyol/transmission/counter/Holder.kt +++ b/sample/src/main/java/com/trendyol/transmission/counter/Holder.kt @@ -4,7 +4,7 @@ import com.trendyol.transmission.Transmission import com.trendyol.transmission.transformer.Transformer import com.trendyol.transmission.transformer.dataholder.dataHolder import com.trendyol.transmission.transformer.request.Contracts -import com.trendyol.transmission.transformer.request.computation.ComputationRegistry +import com.trendyol.transmission.transformer.request.computation.Computations import com.trendyol.transmission.transformer.request.computation.createComputations import com.trendyol.transmission.transformer.request.computation.register import com.trendyol.transmission.transformer.request.computationWithArgs @@ -17,7 +17,7 @@ class Holder : Transformer() { val counterData = dataHolder(TestCounter(0)) - override val computationRegistry: ComputationRegistry = createComputations { + override val computations: Computations = createComputations { register(lookUpAndReturn) { id -> counterData.updateAndGet { it.copy(value = it.value.plus(1)) }.value } diff --git a/sample/src/main/java/com/trendyol/transmission/counter/Worker.kt b/sample/src/main/java/com/trendyol/transmission/counter/Worker.kt index 0e8fa99..724c1b1 100644 --- a/sample/src/main/java/com/trendyol/transmission/counter/Worker.kt +++ b/sample/src/main/java/com/trendyol/transmission/counter/Worker.kt @@ -1,13 +1,13 @@ package com.trendyol.transmission.counter import com.trendyol.transmission.transformer.Transformer -import com.trendyol.transmission.transformer.handler.HandlerRegistry +import com.trendyol.transmission.transformer.handler.Handlers import com.trendyol.transmission.transformer.handler.createHandlers import com.trendyol.transmission.transformer.handler.onSignal class Worker(val id: String) : Transformer() { - override val handlers: HandlerRegistry = createHandlers { + override val handlers: Handlers = createHandlers { onSignal { send(CounterData("Transformer $id updated data to ${compute(lookUpAndReturn, id)}")) }