diff --git a/pom.xml b/pom.xml
index ec7a8aa..a6de643 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,28 +4,27 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.rbkmoney
- parent
- 1.0.5
-
+ dev.vality
+ library-parent-pom
+ 1.0.2
sink-common-lib
- 0.0.8
+ 0.0.1
jar
UTF-8
UTF-8
- 8
- 1.18.4
- [3.9.0,)
+ 15
+ 1.18.22
+ 3.9.0
1.7.30
- 4.12
+ 4.13.2
${project.basedir}/../target/jacoco.exec
- [1.1.21,)
- 1.439-b18f037
- 1.18-d814d69
+ 1.0.4
+ 1.544-dcd92dd
+ 1.21-e4784ab
@@ -45,20 +44,20 @@
${lombok.version}
- com.rbkmoney.woody
+ dev.vality.woody
woody-thrift
${woody.version}
-
+
- com.rbkmoney
+ dev.vality
damsel
${damsel.version}
provided
- com.rbkmoney
+ dev.vality
machinegun-proto
${machinegun-proto.version}
@@ -83,7 +82,7 @@
org.jacoco
jacoco-maven-plugin
- 0.8.2
+ 0.8.7
${sonar.jacoco.reportPath}
true
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/MachineEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/machineevent/MachineEventHandler.java
deleted file mode 100644
index 6b03604..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/MachineEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.machineevent;
-
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.sink.common.handle.EventHandler;
-
-public interface MachineEventHandler extends EventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/PaymentEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/PaymentEventHandler.java
deleted file mode 100644
index 1080f7e..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/PaymentEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload;
-
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
-
-public interface PaymentEventHandler extends MachineEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/PayoutEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/PayoutEventHandler.java
deleted file mode 100644
index 9dc1092..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/PayoutEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload;
-
-import com.rbkmoney.damsel.payout_processing.EventPayload;
-import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
-
-public interface PayoutEventHandler extends MachineEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/CustomerChangeEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/CustomerChangeEventHandler.java
deleted file mode 100644
index d46b1ca..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/CustomerChangeEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change;
-
-import com.rbkmoney.damsel.payment_processing.CustomerChange;
-import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
-
-public interface CustomerChangeEventHandler extends MachineEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/InvoiceChangeEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/InvoiceChangeEventHandler.java
deleted file mode 100644
index 4cafbd7..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/InvoiceChangeEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change;
-
-import com.rbkmoney.damsel.payment_processing.InvoiceChange;
-import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
-
-public interface InvoiceChangeEventHandler extends MachineEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/PartyChangeEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/PartyChangeEventHandler.java
deleted file mode 100644
index 752a0eb..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/PartyChangeEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change;
-
-import com.rbkmoney.damsel.payment_processing.PartyChange;
-import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
-
-public interface PartyChangeEventHandler extends MachineEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/PayoutChangeEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/PayoutChangeEventHandler.java
deleted file mode 100644
index 19c1e79..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/PayoutChangeEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change;
-
-import com.rbkmoney.damsel.payout_processing.PayoutChange;
-import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
-
-public interface PayoutChangeEventHandler extends MachineEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/claimeffect/ClaimEffectEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/claimeffect/ClaimEffectEventHandler.java
deleted file mode 100644
index 0bbc6ab..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/claimeffect/ClaimEffectEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.claimeffect;
-
-import com.rbkmoney.damsel.payment_processing.ClaimEffect;
-import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
-
-public interface ClaimEffectEventHandler extends MachineEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/StockEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/StockEventHandler.java
deleted file mode 100644
index fd09045..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/StockEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent;
-
-import com.rbkmoney.damsel.event_stock.StockEvent;
-import com.rbkmoney.sink.common.handle.EventHandler;
-
-public interface StockEventHandler extends EventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/PaymentEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/PaymentEventHandler.java
deleted file mode 100644
index 8dec231..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/PaymentEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event;
-
-import com.rbkmoney.damsel.payment_processing.Event;
-import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
-
-public interface PaymentEventHandler extends StockEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/PayoutEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/PayoutEventHandler.java
deleted file mode 100644
index 484da9a..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/PayoutEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event;
-
-import com.rbkmoney.damsel.payout_processing.Event;
-import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
-
-public interface PayoutEventHandler extends StockEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/CustomerChangeEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/CustomerChangeEventHandler.java
deleted file mode 100644
index d1c17a2..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/CustomerChangeEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.change;
-
-import com.rbkmoney.damsel.payment_processing.CustomerChange;
-import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
-
-public interface CustomerChangeEventHandler extends StockEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/InvoiceChangeEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/InvoiceChangeEventHandler.java
deleted file mode 100644
index be80f78..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/InvoiceChangeEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.change;
-
-import com.rbkmoney.damsel.payment_processing.InvoiceChange;
-import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
-
-public interface InvoiceChangeEventHandler extends StockEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/PartyChangeEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/PartyChangeEventHandler.java
deleted file mode 100644
index a25d165..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/PartyChangeEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.change;
-
-import com.rbkmoney.damsel.payment_processing.PartyChange;
-import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
-
-public interface PartyChangeEventHandler extends StockEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/PayoutChangeEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/PayoutChangeEventHandler.java
deleted file mode 100644
index 2eeb0b3..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/PayoutChangeEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.change;
-
-import com.rbkmoney.damsel.payout_processing.PayoutChange;
-import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
-
-public interface PayoutChangeEventHandler extends StockEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/claimeffect/ClaimEffectEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/claimeffect/ClaimEffectEventHandler.java
deleted file mode 100644
index 5a2d3b5..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/claimeffect/ClaimEffectEventHandler.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.change.claimeffect;
-
-import com.rbkmoney.damsel.payment_processing.ClaimEffect;
-import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
-
-public interface ClaimEffectEventHandler extends StockEventHandler {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/impl/ClaimEffectStatusAcceptedChangeStockEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/impl/ClaimEffectStatusAcceptedChangeStockEventHandler.java
deleted file mode 100644
index 37f2c6e..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/change/impl/ClaimEffectStatusAcceptedChangeStockEventHandler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.change.impl;
-
-import com.rbkmoney.damsel.event_stock.StockEvent;
-import com.rbkmoney.damsel.payment_processing.ClaimEffect;
-import com.rbkmoney.damsel.payment_processing.PartyChange;
-import com.rbkmoney.sink.common.handle.stockevent.event.change.PartyChangeEventHandler;
-import com.rbkmoney.sink.common.handle.stockevent.event.change.claimeffect.ClaimEffectEventHandler;
-import lombok.RequiredArgsConstructor;
-
-import java.util.List;
-
-@RequiredArgsConstructor
-public class ClaimEffectStatusAcceptedChangeStockEventHandler implements PartyChangeEventHandler {
-
- private final List eventsHandlers;
-
- @Override
- public boolean accept(PartyChange payload) {
- return payload.isSetClaimStatusChanged()
- && payload.getClaimStatusChanged().getStatus().isSetAccepted()
- && payload.getClaimStatusChanged().getStatus().getAccepted().isSetEffects();
- }
-
- @Override
- public void handle(PartyChange payload, StockEvent baseEvent) {
- for (int i = 0; i < payload.getClaimStatusChanged().getStatus().getAccepted().getEffects().size(); i++) {
- ClaimEffect effect = payload.getClaimStatusChanged().getStatus().getAccepted().getEffects().get(i);
- for (ClaimEffectEventHandler eventsHandler : eventsHandlers) {
- if (eventsHandler.accept(effect)) {
- eventsHandler.handle(effect, baseEvent, i);
- }
- }
- }
- }
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/CustomerChangePaymentStockEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/CustomerChangePaymentStockEventHandler.java
deleted file mode 100644
index ad0c4e0..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/CustomerChangePaymentStockEventHandler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.impl;
-
-import com.rbkmoney.damsel.event_stock.StockEvent;
-import com.rbkmoney.damsel.payment_processing.CustomerChange;
-import com.rbkmoney.damsel.payment_processing.Event;
-import com.rbkmoney.sink.common.handle.stockevent.event.PaymentEventHandler;
-import com.rbkmoney.sink.common.handle.stockevent.event.change.CustomerChangeEventHandler;
-import lombok.RequiredArgsConstructor;
-
-import java.util.List;
-
-@RequiredArgsConstructor
-public class CustomerChangePaymentStockEventHandler implements PaymentEventHandler {
-
- private final List eventHandlers;
-
- @Override
- public boolean accept(Event payload) {
- return payload.getPayload().isSetCustomerChanges();
- }
-
- @Override
- public void handle(Event payload, StockEvent baseEvent) {
- for (int i = 0; i < payload.getPayload().getCustomerChanges().size(); i++) {
- CustomerChange change = payload.getPayload().getCustomerChanges().get(i);
- for (CustomerChangeEventHandler eventHandler : eventHandlers) {
- if (eventHandler.accept(change)) {
- eventHandler.handle(change, baseEvent, i);
- }
- }
- }
- }
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/InvoiceChangePaymentStockEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/InvoiceChangePaymentStockEventHandler.java
deleted file mode 100644
index 7b2ffbf..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/InvoiceChangePaymentStockEventHandler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.impl;
-
-import com.rbkmoney.damsel.event_stock.StockEvent;
-import com.rbkmoney.damsel.payment_processing.Event;
-import com.rbkmoney.damsel.payment_processing.InvoiceChange;
-import com.rbkmoney.sink.common.handle.stockevent.event.PaymentEventHandler;
-import com.rbkmoney.sink.common.handle.stockevent.event.change.InvoiceChangeEventHandler;
-import lombok.RequiredArgsConstructor;
-
-import java.util.List;
-
-@RequiredArgsConstructor
-public class InvoiceChangePaymentStockEventHandler implements PaymentEventHandler {
-
- private final List eventHandlers;
-
- @Override
- public boolean accept(Event payload) {
- return payload.getPayload().isSetInvoiceChanges();
- }
-
- @Override
- public void handle(Event payload, StockEvent baseEvent) {
- for (int i = 0; i < payload.getPayload().getInvoiceChanges().size(); i++) {
- InvoiceChange change = payload.getPayload().getInvoiceChanges().get(i);
- for (InvoiceChangeEventHandler eventHandler : eventHandlers) {
- if (eventHandler.accept(change)) {
- eventHandler.handle(change, baseEvent, i);
- }
- }
- }
- }
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/PartyChangePaymentStockEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/PartyChangePaymentStockEventHandler.java
deleted file mode 100644
index 6e68e83..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/PartyChangePaymentStockEventHandler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.impl;
-
-import com.rbkmoney.damsel.event_stock.StockEvent;
-import com.rbkmoney.damsel.payment_processing.Event;
-import com.rbkmoney.damsel.payment_processing.PartyChange;
-import com.rbkmoney.sink.common.handle.stockevent.event.PaymentEventHandler;
-import com.rbkmoney.sink.common.handle.stockevent.event.change.PartyChangeEventHandler;
-import lombok.RequiredArgsConstructor;
-
-import java.util.List;
-
-@RequiredArgsConstructor
-public class PartyChangePaymentStockEventHandler implements PaymentEventHandler {
-
- private final List eventHandlers;
-
- @Override
- public boolean accept(Event payload) {
- return payload.getPayload().isSetPartyChanges();
- }
-
- @Override
- public void handle(Event payload, StockEvent baseEvent) {
- for (int i = 0; i < payload.getPayload().getPartyChanges().size(); i++) {
- PartyChange change = payload.getPayload().getPartyChanges().get(i);
- for (PartyChangeEventHandler eventHandler : eventHandlers) {
- if (eventHandler.accept(change)) {
- eventHandler.handle(change, baseEvent, i);
- }
- }
- }
- }
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/PayoutChangePayoutStockEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/PayoutChangePayoutStockEventHandler.java
deleted file mode 100644
index a2dc2d7..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/event/impl/PayoutChangePayoutStockEventHandler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.event.impl;
-
-import com.rbkmoney.damsel.event_stock.StockEvent;
-import com.rbkmoney.damsel.payout_processing.Event;
-import com.rbkmoney.damsel.payout_processing.PayoutChange;
-import com.rbkmoney.sink.common.handle.stockevent.event.PayoutEventHandler;
-import com.rbkmoney.sink.common.handle.stockevent.event.change.PayoutChangeEventHandler;
-import lombok.RequiredArgsConstructor;
-
-import java.util.List;
-
-@RequiredArgsConstructor
-public class PayoutChangePayoutStockEventHandler implements PayoutEventHandler {
-
- private final List eventHandlers;
-
- @Override
- public boolean accept(Event payload) {
- return payload.getPayload().isSetPayoutChanges();
- }
-
- @Override
- public void handle(Event payload, StockEvent baseEvent) {
- for (int i = 0; i < payload.getPayload().getPayoutChanges().size(); i++) {
- PayoutChange change = payload.getPayload().getPayoutChanges().get(i);
- for (PayoutChangeEventHandler eventHandler : eventHandlers) {
- if (eventHandler.accept(change)) {
- eventHandler.handle(change, baseEvent, i);
- }
- }
- }
- }
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/impl/PaymentEventStockEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/impl/PaymentEventStockEventHandler.java
deleted file mode 100644
index cbe2f53..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/impl/PaymentEventStockEventHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.impl;
-
-import com.rbkmoney.damsel.event_stock.StockEvent;
-import com.rbkmoney.damsel.payment_processing.Event;
-import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
-import com.rbkmoney.sink.common.handle.stockevent.event.PaymentEventHandler;
-import lombok.RequiredArgsConstructor;
-
-import java.util.List;
-
-@RequiredArgsConstructor
-public class PaymentEventStockEventHandler implements StockEventHandler {
-
- private final List eventHandlers;
-
- @Override
- public boolean accept(StockEvent payload) {
- return payload.getSourceEvent().isSetProcessingEvent();
- }
-
- @Override
- public void handle(StockEvent payload, StockEvent baseEvent) {
- Event event = payload.getSourceEvent().getProcessingEvent();
- for (PaymentEventHandler eventHandler : eventHandlers) {
- if (eventHandler.accept(event)) {
- eventHandler.handle(event, baseEvent);
- }
- }
- }
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/impl/PayoutEventStockEventHandler.java b/src/main/java/com/rbkmoney/sink/common/handle/stockevent/impl/PayoutEventStockEventHandler.java
deleted file mode 100644
index 995ccaf..0000000
--- a/src/main/java/com/rbkmoney/sink/common/handle/stockevent/impl/PayoutEventStockEventHandler.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.rbkmoney.sink.common.handle.stockevent.impl;
-
-import com.rbkmoney.damsel.event_stock.StockEvent;
-import com.rbkmoney.damsel.payout_processing.Event;
-import com.rbkmoney.sink.common.handle.stockevent.StockEventHandler;
-import com.rbkmoney.sink.common.handle.stockevent.event.PayoutEventHandler;
-import lombok.RequiredArgsConstructor;
-
-import java.util.List;
-
-@RequiredArgsConstructor
-public class PayoutEventStockEventHandler implements StockEventHandler {
-
- private final List eventHandlers;
-
- @Override
- public boolean accept(StockEvent payload) {
- return payload.getSourceEvent().isSetPayoutEvent();
- }
-
- @Override
- public void handle(StockEvent payload, StockEvent baseEvent) {
- Event event = payload.getSourceEvent().getPayoutEvent();
- for (PayoutEventHandler eventHandler : eventHandlers) {
- if (eventHandler.accept(event)) {
- eventHandler.handle(event, baseEvent);
- }
- }
- }
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PartyEventDataSerializer.java b/src/main/java/com/rbkmoney/sink/common/serialization/impl/PartyEventDataSerializer.java
deleted file mode 100644
index d1f279a..0000000
--- a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PartyEventDataSerializer.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.rbkmoney.sink.common.serialization.impl;
-
-import com.rbkmoney.damsel.payment_processing.PartyEventData;
-
-public class PartyEventDataSerializer extends ThriftBinarySerializer {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PaymentEventPayloadSerializer.java b/src/main/java/com/rbkmoney/sink/common/serialization/impl/PaymentEventPayloadSerializer.java
deleted file mode 100644
index bf305a7..0000000
--- a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PaymentEventPayloadSerializer.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.rbkmoney.sink.common.serialization.impl;
-
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-
-public class PaymentEventPayloadSerializer extends ThriftBinarySerializer {
-
-}
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PayoutEventPayloadSerializer.java b/src/main/java/com/rbkmoney/sink/common/serialization/impl/PayoutEventPayloadSerializer.java
deleted file mode 100644
index 5f217fb..0000000
--- a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PayoutEventPayloadSerializer.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.sink.common.serialization.impl;
-
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-
-public class PayoutEventPayloadSerializer extends ThriftBinarySerializer {
-
-}
-
diff --git a/src/main/java/com/rbkmoney/sink/common/exception/ParseException.java b/src/main/java/dev/vality/sink/common/exception/ParseException.java
similarity index 92%
rename from src/main/java/com/rbkmoney/sink/common/exception/ParseException.java
rename to src/main/java/dev/vality/sink/common/exception/ParseException.java
index 6c7a081..2227d22 100644
--- a/src/main/java/com/rbkmoney/sink/common/exception/ParseException.java
+++ b/src/main/java/dev/vality/sink/common/exception/ParseException.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.sink.common.exception;
+package dev.vality.sink.common.exception;
public class ParseException extends RuntimeException {
diff --git a/src/main/java/com/rbkmoney/sink/common/exception/ThriftBinaryDeserializationException.java b/src/main/java/dev/vality/sink/common/exception/ThriftBinaryDeserializationException.java
similarity index 78%
rename from src/main/java/com/rbkmoney/sink/common/exception/ThriftBinaryDeserializationException.java
rename to src/main/java/dev/vality/sink/common/exception/ThriftBinaryDeserializationException.java
index 4bd8600..9af1f8b 100644
--- a/src/main/java/com/rbkmoney/sink/common/exception/ThriftBinaryDeserializationException.java
+++ b/src/main/java/dev/vality/sink/common/exception/ThriftBinaryDeserializationException.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.sink.common.exception;
+package dev.vality.sink.common.exception;
public class ThriftBinaryDeserializationException extends RuntimeException {
@@ -17,7 +17,8 @@ public class ThriftBinaryDeserializationException extends RuntimeException {
super(cause);
}
- public ThriftBinaryDeserializationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ public ThriftBinaryDeserializationException(String message, Throwable cause, boolean enableSuppression,
+ boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
diff --git a/src/main/java/com/rbkmoney/sink/common/exception/ThriftBinarySerializationException.java b/src/main/java/dev/vality/sink/common/exception/ThriftBinarySerializationException.java
similarity index 78%
rename from src/main/java/com/rbkmoney/sink/common/exception/ThriftBinarySerializationException.java
rename to src/main/java/dev/vality/sink/common/exception/ThriftBinarySerializationException.java
index 315e0ab..f37df14 100644
--- a/src/main/java/com/rbkmoney/sink/common/exception/ThriftBinarySerializationException.java
+++ b/src/main/java/dev/vality/sink/common/exception/ThriftBinarySerializationException.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.sink.common.exception;
+package dev.vality.sink.common.exception;
public class ThriftBinarySerializationException extends RuntimeException {
@@ -17,7 +17,8 @@ public class ThriftBinarySerializationException extends RuntimeException {
super(cause);
}
- public ThriftBinarySerializationException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ public ThriftBinarySerializationException(String message, Throwable cause, boolean enableSuppression,
+ boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/EventHandler.java b/src/main/java/dev/vality/sink/common/handle/EventHandler.java
similarity index 85%
rename from src/main/java/com/rbkmoney/sink/common/handle/EventHandler.java
rename to src/main/java/dev/vality/sink/common/handle/EventHandler.java
index b62e21d..71866db 100644
--- a/src/main/java/com/rbkmoney/sink/common/handle/EventHandler.java
+++ b/src/main/java/dev/vality/sink/common/handle/EventHandler.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.sink.common.handle;
+package dev.vality.sink.common.handle;
public interface EventHandler {
diff --git a/src/main/java/dev/vality/sink/common/handle/machineevent/MachineEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/MachineEventHandler.java
new file mode 100644
index 0000000..d91bd99
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/MachineEventHandler.java
@@ -0,0 +1,8 @@
+package dev.vality.sink.common.handle.machineevent;
+
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.sink.common.handle.EventHandler;
+
+public interface MachineEventHandler extends EventHandler {
+
+}
diff --git a/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/PaymentEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/PaymentEventHandler.java
new file mode 100644
index 0000000..bac9caf
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/PaymentEventHandler.java
@@ -0,0 +1,8 @@
+package dev.vality.sink.common.handle.machineevent.eventpayload;
+
+import dev.vality.damsel.payment_processing.EventPayload;
+import dev.vality.sink.common.handle.machineevent.MachineEventHandler;
+
+public interface PaymentEventHandler extends MachineEventHandler {
+
+}
diff --git a/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/PayoutEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/PayoutEventHandler.java
new file mode 100644
index 0000000..4d38499
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/PayoutEventHandler.java
@@ -0,0 +1,8 @@
+package dev.vality.sink.common.handle.machineevent.eventpayload;
+
+import dev.vality.damsel.payout_processing.EventPayload;
+import dev.vality.sink.common.handle.machineevent.MachineEventHandler;
+
+public interface PayoutEventHandler extends MachineEventHandler {
+
+}
diff --git a/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/CustomerChangeEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/CustomerChangeEventHandler.java
new file mode 100644
index 0000000..2fafb02
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/CustomerChangeEventHandler.java
@@ -0,0 +1,8 @@
+package dev.vality.sink.common.handle.machineevent.eventpayload.change;
+
+import dev.vality.damsel.payment_processing.CustomerChange;
+import dev.vality.sink.common.handle.machineevent.MachineEventHandler;
+
+public interface CustomerChangeEventHandler extends MachineEventHandler {
+
+}
diff --git a/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/InvoiceChangeEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/InvoiceChangeEventHandler.java
new file mode 100644
index 0000000..8d561f0
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/InvoiceChangeEventHandler.java
@@ -0,0 +1,8 @@
+package dev.vality.sink.common.handle.machineevent.eventpayload.change;
+
+import dev.vality.damsel.payment_processing.InvoiceChange;
+import dev.vality.sink.common.handle.machineevent.MachineEventHandler;
+
+public interface InvoiceChangeEventHandler extends MachineEventHandler {
+
+}
diff --git a/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/PartyChangeEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/PartyChangeEventHandler.java
new file mode 100644
index 0000000..019d174
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/PartyChangeEventHandler.java
@@ -0,0 +1,8 @@
+package dev.vality.sink.common.handle.machineevent.eventpayload.change;
+
+import dev.vality.damsel.payment_processing.PartyChange;
+import dev.vality.sink.common.handle.machineevent.MachineEventHandler;
+
+public interface PartyChangeEventHandler extends MachineEventHandler {
+
+}
diff --git a/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/PayoutChangeEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/PayoutChangeEventHandler.java
new file mode 100644
index 0000000..cbd2147
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/PayoutChangeEventHandler.java
@@ -0,0 +1,8 @@
+package dev.vality.sink.common.handle.machineevent.eventpayload.change;
+
+import dev.vality.damsel.payout_processing.PayoutChange;
+import dev.vality.sink.common.handle.machineevent.MachineEventHandler;
+
+public interface PayoutChangeEventHandler extends MachineEventHandler {
+
+}
diff --git a/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/claimeffect/ClaimEffectEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/claimeffect/ClaimEffectEventHandler.java
new file mode 100644
index 0000000..6fe4d50
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/claimeffect/ClaimEffectEventHandler.java
@@ -0,0 +1,8 @@
+package dev.vality.sink.common.handle.machineevent.eventpayload.change.claimeffect;
+
+import dev.vality.damsel.payment_processing.ClaimEffect;
+import dev.vality.sink.common.handle.machineevent.MachineEventHandler;
+
+public interface ClaimEffectEventHandler extends MachineEventHandler {
+
+}
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/impl/ClaimEffectStatusAcceptedChangeMachineEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/impl/ClaimEffectStatusAcceptedChangeMachineEventHandler.java
similarity index 70%
rename from src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/impl/ClaimEffectStatusAcceptedChangeMachineEventHandler.java
rename to src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/impl/ClaimEffectStatusAcceptedChangeMachineEventHandler.java
index b33ffc5..74f8a80 100644
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/change/impl/ClaimEffectStatusAcceptedChangeMachineEventHandler.java
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/change/impl/ClaimEffectStatusAcceptedChangeMachineEventHandler.java
@@ -1,10 +1,10 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.impl;
+package dev.vality.sink.common.handle.machineevent.eventpayload.change.impl;
-import com.rbkmoney.damsel.payment_processing.ClaimEffect;
-import com.rbkmoney.damsel.payment_processing.PartyChange;
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.PartyChangeEventHandler;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.claimeffect.ClaimEffectEventHandler;
+import dev.vality.damsel.payment_processing.ClaimEffect;
+import dev.vality.damsel.payment_processing.PartyChange;
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.sink.common.handle.machineevent.eventpayload.change.PartyChangeEventHandler;
+import dev.vality.sink.common.handle.machineevent.eventpayload.change.claimeffect.ClaimEffectEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/CustomerChangePaymentMachineEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/CustomerChangePaymentMachineEventHandler.java
similarity index 66%
rename from src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/CustomerChangePaymentMachineEventHandler.java
rename to src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/CustomerChangePaymentMachineEventHandler.java
index ca2a3dd..9d215cc 100644
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/CustomerChangePaymentMachineEventHandler.java
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/CustomerChangePaymentMachineEventHandler.java
@@ -1,10 +1,10 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.impl;
+package dev.vality.sink.common.handle.machineevent.eventpayload.impl;
-import com.rbkmoney.damsel.payment_processing.CustomerChange;
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.CustomerChangeEventHandler;
+import dev.vality.damsel.payment_processing.CustomerChange;
+import dev.vality.damsel.payment_processing.EventPayload;
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
+import dev.vality.sink.common.handle.machineevent.eventpayload.change.CustomerChangeEventHandler;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/InvoiceChangePaymentMachineEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/InvoiceChangePaymentMachineEventHandler.java
similarity index 65%
rename from src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/InvoiceChangePaymentMachineEventHandler.java
rename to src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/InvoiceChangePaymentMachineEventHandler.java
index 60689de..1b6599e 100644
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/InvoiceChangePaymentMachineEventHandler.java
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/InvoiceChangePaymentMachineEventHandler.java
@@ -1,10 +1,10 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.impl;
+package dev.vality.sink.common.handle.machineevent.eventpayload.impl;
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-import com.rbkmoney.damsel.payment_processing.InvoiceChange;
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.InvoiceChangeEventHandler;
+import dev.vality.damsel.payment_processing.EventPayload;
+import dev.vality.damsel.payment_processing.InvoiceChange;
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
+import dev.vality.sink.common.handle.machineevent.eventpayload.change.InvoiceChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/PartyChangePaymentMachineEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/PartyChangePaymentMachineEventHandler.java
similarity index 65%
rename from src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/PartyChangePaymentMachineEventHandler.java
rename to src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/PartyChangePaymentMachineEventHandler.java
index c7bfffd..7bdc52a 100644
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/PartyChangePaymentMachineEventHandler.java
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/PartyChangePaymentMachineEventHandler.java
@@ -1,10 +1,10 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.impl;
+package dev.vality.sink.common.handle.machineevent.eventpayload.impl;
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-import com.rbkmoney.damsel.payment_processing.PartyChange;
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.PartyChangeEventHandler;
+import dev.vality.damsel.payment_processing.EventPayload;
+import dev.vality.damsel.payment_processing.PartyChange;
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
+import dev.vality.sink.common.handle.machineevent.eventpayload.change.PartyChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/PayoutChangePayoutMachineEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/PayoutChangePayoutMachineEventHandler.java
similarity index 65%
rename from src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/PayoutChangePayoutMachineEventHandler.java
rename to src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/PayoutChangePayoutMachineEventHandler.java
index 6a57868..555e706 100644
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/eventpayload/impl/PayoutChangePayoutMachineEventHandler.java
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/eventpayload/impl/PayoutChangePayoutMachineEventHandler.java
@@ -1,10 +1,10 @@
-package com.rbkmoney.sink.common.handle.machineevent.eventpayload.impl;
+package dev.vality.sink.common.handle.machineevent.eventpayload.impl;
-import com.rbkmoney.damsel.payout_processing.EventPayload;
-import com.rbkmoney.damsel.payout_processing.PayoutChange;
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PayoutEventHandler;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.change.PayoutChangeEventHandler;
+import dev.vality.damsel.payout_processing.EventPayload;
+import dev.vality.damsel.payout_processing.PayoutChange;
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.sink.common.handle.machineevent.eventpayload.PayoutEventHandler;
+import dev.vality.sink.common.handle.machineevent.eventpayload.change.PayoutChangeEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/impl/PaymentEventMachineEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/impl/PaymentEventMachineEventHandler.java
similarity index 61%
rename from src/main/java/com/rbkmoney/sink/common/handle/machineevent/impl/PaymentEventMachineEventHandler.java
rename to src/main/java/dev/vality/sink/common/handle/machineevent/impl/PaymentEventMachineEventHandler.java
index 8aa125a..4d3f226 100644
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/impl/PaymentEventMachineEventHandler.java
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/impl/PaymentEventMachineEventHandler.java
@@ -1,9 +1,9 @@
-package com.rbkmoney.sink.common.handle.machineevent.impl;
+package dev.vality.sink.common.handle.machineevent.impl;
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
+import dev.vality.damsel.payment_processing.EventPayload;
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.sink.common.handle.machineevent.MachineEventHandler;
+import dev.vality.sink.common.handle.machineevent.eventpayload.PaymentEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
diff --git a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/impl/PayoutEventMachineEventHandler.java b/src/main/java/dev/vality/sink/common/handle/machineevent/impl/PayoutEventMachineEventHandler.java
similarity index 61%
rename from src/main/java/com/rbkmoney/sink/common/handle/machineevent/impl/PayoutEventMachineEventHandler.java
rename to src/main/java/dev/vality/sink/common/handle/machineevent/impl/PayoutEventMachineEventHandler.java
index 72f273c..f18cb35 100644
--- a/src/main/java/com/rbkmoney/sink/common/handle/machineevent/impl/PayoutEventMachineEventHandler.java
+++ b/src/main/java/dev/vality/sink/common/handle/machineevent/impl/PayoutEventMachineEventHandler.java
@@ -1,9 +1,9 @@
-package com.rbkmoney.sink.common.handle.machineevent.impl;
+package dev.vality.sink.common.handle.machineevent.impl;
-import com.rbkmoney.damsel.payout_processing.EventPayload;
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.sink.common.handle.machineevent.MachineEventHandler;
-import com.rbkmoney.sink.common.handle.machineevent.eventpayload.PayoutEventHandler;
+import dev.vality.damsel.payout_processing.EventPayload;
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.sink.common.handle.machineevent.MachineEventHandler;
+import dev.vality.sink.common.handle.machineevent.eventpayload.PayoutEventHandler;
import lombok.RequiredArgsConstructor;
import java.util.List;
diff --git a/src/main/java/com/rbkmoney/sink/common/parser/Parser.java b/src/main/java/dev/vality/sink/common/parser/Parser.java
similarity index 58%
rename from src/main/java/com/rbkmoney/sink/common/parser/Parser.java
rename to src/main/java/dev/vality/sink/common/parser/Parser.java
index 50fa4ee..da8b435 100644
--- a/src/main/java/com/rbkmoney/sink/common/parser/Parser.java
+++ b/src/main/java/dev/vality/sink/common/parser/Parser.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.sink.common.parser;
+package dev.vality.sink.common.parser;
public interface Parser {
diff --git a/src/main/java/com/rbkmoney/sink/common/parser/impl/MachineEventParser.java b/src/main/java/dev/vality/sink/common/parser/impl/MachineEventParser.java
similarity index 67%
rename from src/main/java/com/rbkmoney/sink/common/parser/impl/MachineEventParser.java
rename to src/main/java/dev/vality/sink/common/parser/impl/MachineEventParser.java
index 844c6d6..2e81ab8 100644
--- a/src/main/java/com/rbkmoney/sink/common/parser/impl/MachineEventParser.java
+++ b/src/main/java/dev/vality/sink/common/parser/impl/MachineEventParser.java
@@ -1,9 +1,9 @@
-package com.rbkmoney.sink.common.parser.impl;
+package dev.vality.sink.common.parser.impl;
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.sink.common.exception.ParseException;
-import com.rbkmoney.sink.common.parser.Parser;
-import com.rbkmoney.sink.common.serialization.BinaryDeserializer;
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.sink.common.exception.ParseException;
+import dev.vality.sink.common.parser.Parser;
+import dev.vality.sink.common.serialization.BinaryDeserializer;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
diff --git a/src/main/java/com/rbkmoney/sink/common/parser/impl/PartyEventDataMachineEventParser.java b/src/main/java/dev/vality/sink/common/parser/impl/PartyEventDataMachineEventParser.java
similarity index 56%
rename from src/main/java/com/rbkmoney/sink/common/parser/impl/PartyEventDataMachineEventParser.java
rename to src/main/java/dev/vality/sink/common/parser/impl/PartyEventDataMachineEventParser.java
index 4dc3947..46e4d27 100644
--- a/src/main/java/com/rbkmoney/sink/common/parser/impl/PartyEventDataMachineEventParser.java
+++ b/src/main/java/dev/vality/sink/common/parser/impl/PartyEventDataMachineEventParser.java
@@ -1,7 +1,7 @@
-package com.rbkmoney.sink.common.parser.impl;
+package dev.vality.sink.common.parser.impl;
-import com.rbkmoney.damsel.payment_processing.PartyEventData;
-import com.rbkmoney.sink.common.serialization.BinaryDeserializer;
+import dev.vality.damsel.payment_processing.PartyEventData;
+import dev.vality.sink.common.serialization.BinaryDeserializer;
public class PartyEventDataMachineEventParser extends MachineEventParser {
diff --git a/src/main/java/com/rbkmoney/sink/common/parser/impl/PaymentEventPayloadMachineEventParser.java b/src/main/java/dev/vality/sink/common/parser/impl/PaymentEventPayloadMachineEventParser.java
similarity index 57%
rename from src/main/java/com/rbkmoney/sink/common/parser/impl/PaymentEventPayloadMachineEventParser.java
rename to src/main/java/dev/vality/sink/common/parser/impl/PaymentEventPayloadMachineEventParser.java
index ea0d4d5..6b65b13 100644
--- a/src/main/java/com/rbkmoney/sink/common/parser/impl/PaymentEventPayloadMachineEventParser.java
+++ b/src/main/java/dev/vality/sink/common/parser/impl/PaymentEventPayloadMachineEventParser.java
@@ -1,7 +1,7 @@
-package com.rbkmoney.sink.common.parser.impl;
+package dev.vality.sink.common.parser.impl;
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-import com.rbkmoney.sink.common.serialization.BinaryDeserializer;
+import dev.vality.damsel.payment_processing.EventPayload;
+import dev.vality.sink.common.serialization.BinaryDeserializer;
public class PaymentEventPayloadMachineEventParser extends MachineEventParser {
diff --git a/src/main/java/com/rbkmoney/sink/common/parser/impl/PayoutEventPayloadMachineEventParser.java b/src/main/java/dev/vality/sink/common/parser/impl/PayoutEventPayloadMachineEventParser.java
similarity index 57%
rename from src/main/java/com/rbkmoney/sink/common/parser/impl/PayoutEventPayloadMachineEventParser.java
rename to src/main/java/dev/vality/sink/common/parser/impl/PayoutEventPayloadMachineEventParser.java
index 2e95824..2e692a9 100644
--- a/src/main/java/com/rbkmoney/sink/common/parser/impl/PayoutEventPayloadMachineEventParser.java
+++ b/src/main/java/dev/vality/sink/common/parser/impl/PayoutEventPayloadMachineEventParser.java
@@ -1,7 +1,7 @@
-package com.rbkmoney.sink.common.parser.impl;
+package dev.vality.sink.common.parser.impl;
-import com.rbkmoney.damsel.payout_processing.EventPayload;
-import com.rbkmoney.sink.common.serialization.BinaryDeserializer;
+import dev.vality.damsel.payout_processing.EventPayload;
+import dev.vality.sink.common.serialization.BinaryDeserializer;
public class PayoutEventPayloadMachineEventParser extends MachineEventParser {
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/BinaryDeserializer.java b/src/main/java/dev/vality/sink/common/serialization/BinaryDeserializer.java
similarity index 61%
rename from src/main/java/com/rbkmoney/sink/common/serialization/BinaryDeserializer.java
rename to src/main/java/dev/vality/sink/common/serialization/BinaryDeserializer.java
index eba81b5..0abbc20 100644
--- a/src/main/java/com/rbkmoney/sink/common/serialization/BinaryDeserializer.java
+++ b/src/main/java/dev/vality/sink/common/serialization/BinaryDeserializer.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.sink.common.serialization;
+package dev.vality.sink.common.serialization;
public interface BinaryDeserializer {
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/BinarySerializer.java b/src/main/java/dev/vality/sink/common/serialization/BinarySerializer.java
similarity index 60%
rename from src/main/java/com/rbkmoney/sink/common/serialization/BinarySerializer.java
rename to src/main/java/dev/vality/sink/common/serialization/BinarySerializer.java
index b130eb8..862e542 100644
--- a/src/main/java/com/rbkmoney/sink/common/serialization/BinarySerializer.java
+++ b/src/main/java/dev/vality/sink/common/serialization/BinarySerializer.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.sink.common.serialization;
+package dev.vality.sink.common.serialization;
public interface BinarySerializer {
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/impl/AbstractThriftBinaryDeserializer.java b/src/main/java/dev/vality/sink/common/serialization/impl/AbstractThriftBinaryDeserializer.java
similarity index 61%
rename from src/main/java/com/rbkmoney/sink/common/serialization/impl/AbstractThriftBinaryDeserializer.java
rename to src/main/java/dev/vality/sink/common/serialization/impl/AbstractThriftBinaryDeserializer.java
index 8b4cddb..affda21 100644
--- a/src/main/java/com/rbkmoney/sink/common/serialization/impl/AbstractThriftBinaryDeserializer.java
+++ b/src/main/java/dev/vality/sink/common/serialization/impl/AbstractThriftBinaryDeserializer.java
@@ -1,16 +1,23 @@
-package com.rbkmoney.sink.common.serialization.impl;
+package dev.vality.sink.common.serialization.impl;
-import com.rbkmoney.sink.common.exception.ThriftBinaryDeserializationException;
-import com.rbkmoney.sink.common.serialization.BinaryDeserializer;
+import dev.vality.sink.common.exception.ThriftBinaryDeserializationException;
+import dev.vality.sink.common.serialization.BinaryDeserializer;
import lombok.extern.slf4j.Slf4j;
import org.apache.thrift.TBase;
import org.apache.thrift.TDeserializer;
import org.apache.thrift.TException;
+import org.apache.thrift.transport.TTransportException;
@Slf4j
public abstract class AbstractThriftBinaryDeserializer implements BinaryDeserializer {
- private final ThreadLocal thriftDeserializer = ThreadLocal.withInitial(TDeserializer::new);
+ private final ThreadLocal thriftDeserializer = ThreadLocal.withInitial(() -> {
+ try {
+ return new TDeserializer();
+ } catch (TTransportException e) {
+ throw new RuntimeException(e);
+ }
+ });
protected T deserialize(byte[] bin, T t) {
log.debug("Deserialize, bin[]: {}", bin.length);
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PartyEventDataDeserializer.java b/src/main/java/dev/vality/sink/common/serialization/impl/PartyEventDataDeserializer.java
similarity index 66%
rename from src/main/java/com/rbkmoney/sink/common/serialization/impl/PartyEventDataDeserializer.java
rename to src/main/java/dev/vality/sink/common/serialization/impl/PartyEventDataDeserializer.java
index 93bf758..eb84ac2 100644
--- a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PartyEventDataDeserializer.java
+++ b/src/main/java/dev/vality/sink/common/serialization/impl/PartyEventDataDeserializer.java
@@ -1,6 +1,6 @@
-package com.rbkmoney.sink.common.serialization.impl;
+package dev.vality.sink.common.serialization.impl;
-import com.rbkmoney.damsel.payment_processing.PartyEventData;
+import dev.vality.damsel.payment_processing.PartyEventData;
public class PartyEventDataDeserializer extends AbstractThriftBinaryDeserializer {
diff --git a/src/main/java/dev/vality/sink/common/serialization/impl/PartyEventDataSerializer.java b/src/main/java/dev/vality/sink/common/serialization/impl/PartyEventDataSerializer.java
new file mode 100644
index 0000000..b5e497f
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/serialization/impl/PartyEventDataSerializer.java
@@ -0,0 +1,7 @@
+package dev.vality.sink.common.serialization.impl;
+
+import dev.vality.damsel.payment_processing.PartyEventData;
+
+public class PartyEventDataSerializer extends ThriftBinarySerializer {
+
+}
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PaymentEventPayloadDeserializer.java b/src/main/java/dev/vality/sink/common/serialization/impl/PaymentEventPayloadDeserializer.java
similarity index 67%
rename from src/main/java/com/rbkmoney/sink/common/serialization/impl/PaymentEventPayloadDeserializer.java
rename to src/main/java/dev/vality/sink/common/serialization/impl/PaymentEventPayloadDeserializer.java
index fa929e7..2a30995 100644
--- a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PaymentEventPayloadDeserializer.java
+++ b/src/main/java/dev/vality/sink/common/serialization/impl/PaymentEventPayloadDeserializer.java
@@ -1,6 +1,6 @@
-package com.rbkmoney.sink.common.serialization.impl;
+package dev.vality.sink.common.serialization.impl;
-import com.rbkmoney.damsel.payment_processing.EventPayload;
+import dev.vality.damsel.payment_processing.EventPayload;
public class PaymentEventPayloadDeserializer extends AbstractThriftBinaryDeserializer {
diff --git a/src/main/java/dev/vality/sink/common/serialization/impl/PaymentEventPayloadSerializer.java b/src/main/java/dev/vality/sink/common/serialization/impl/PaymentEventPayloadSerializer.java
new file mode 100644
index 0000000..6194420
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/serialization/impl/PaymentEventPayloadSerializer.java
@@ -0,0 +1,7 @@
+package dev.vality.sink.common.serialization.impl;
+
+import dev.vality.damsel.payment_processing.EventPayload;
+
+public class PaymentEventPayloadSerializer extends ThriftBinarySerializer {
+
+}
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PayoutEventPayloadDeserializer.java b/src/main/java/dev/vality/sink/common/serialization/impl/PayoutEventPayloadDeserializer.java
similarity index 67%
rename from src/main/java/com/rbkmoney/sink/common/serialization/impl/PayoutEventPayloadDeserializer.java
rename to src/main/java/dev/vality/sink/common/serialization/impl/PayoutEventPayloadDeserializer.java
index d503394..a373089 100644
--- a/src/main/java/com/rbkmoney/sink/common/serialization/impl/PayoutEventPayloadDeserializer.java
+++ b/src/main/java/dev/vality/sink/common/serialization/impl/PayoutEventPayloadDeserializer.java
@@ -1,6 +1,6 @@
-package com.rbkmoney.sink.common.serialization.impl;
+package dev.vality.sink.common.serialization.impl;
-import com.rbkmoney.damsel.payout_processing.EventPayload;
+import dev.vality.damsel.payout_processing.EventPayload;
public class PayoutEventPayloadDeserializer extends AbstractThriftBinaryDeserializer {
diff --git a/src/main/java/dev/vality/sink/common/serialization/impl/PayoutEventPayloadSerializer.java b/src/main/java/dev/vality/sink/common/serialization/impl/PayoutEventPayloadSerializer.java
new file mode 100644
index 0000000..183bfc9
--- /dev/null
+++ b/src/main/java/dev/vality/sink/common/serialization/impl/PayoutEventPayloadSerializer.java
@@ -0,0 +1,8 @@
+package dev.vality.sink.common.serialization.impl;
+
+import dev.vality.damsel.payment_processing.EventPayload;
+
+public class PayoutEventPayloadSerializer extends ThriftBinarySerializer {
+
+}
+
diff --git a/src/main/java/com/rbkmoney/sink/common/serialization/impl/ThriftBinarySerializer.java b/src/main/java/dev/vality/sink/common/serialization/impl/ThriftBinarySerializer.java
similarity index 60%
rename from src/main/java/com/rbkmoney/sink/common/serialization/impl/ThriftBinarySerializer.java
rename to src/main/java/dev/vality/sink/common/serialization/impl/ThriftBinarySerializer.java
index 0a0dae3..b93a625 100644
--- a/src/main/java/com/rbkmoney/sink/common/serialization/impl/ThriftBinarySerializer.java
+++ b/src/main/java/dev/vality/sink/common/serialization/impl/ThriftBinarySerializer.java
@@ -1,16 +1,23 @@
-package com.rbkmoney.sink.common.serialization.impl;
+package dev.vality.sink.common.serialization.impl;
-import com.rbkmoney.sink.common.exception.ThriftBinarySerializationException;
-import com.rbkmoney.sink.common.serialization.BinarySerializer;
+import dev.vality.sink.common.exception.ThriftBinarySerializationException;
+import dev.vality.sink.common.serialization.BinarySerializer;
import lombok.extern.slf4j.Slf4j;
import org.apache.thrift.TBase;
import org.apache.thrift.TException;
import org.apache.thrift.TSerializer;
+import org.apache.thrift.transport.TTransportException;
@Slf4j
public class ThriftBinarySerializer implements BinarySerializer {
- private final ThreadLocal thriftSerializer = ThreadLocal.withInitial(TSerializer::new);
+ private final ThreadLocal thriftSerializer = ThreadLocal.withInitial(() -> {
+ try {
+ return new TSerializer();
+ } catch (TTransportException e) {
+ throw new RuntimeException(e);
+ }
+ });
@Override
public byte[] serialize(T data) {
diff --git a/src/test/java/com/rbkmoney/sink/common/parser/ParserTest.java b/src/test/java/dev/vality/sink/common/parser/ParserTest.java
similarity index 57%
rename from src/test/java/com/rbkmoney/sink/common/parser/ParserTest.java
rename to src/test/java/dev/vality/sink/common/parser/ParserTest.java
index 9b19521..0f658f1 100644
--- a/src/test/java/com/rbkmoney/sink/common/parser/ParserTest.java
+++ b/src/test/java/dev/vality/sink/common/parser/ParserTest.java
@@ -1,11 +1,11 @@
-package com.rbkmoney.sink.common.parser;
+package dev.vality.sink.common.parser;
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-import com.rbkmoney.machinegun.eventsink.MachineEvent;
-import com.rbkmoney.machinegun.msgpack.Value;
-import com.rbkmoney.sink.common.parser.impl.PaymentEventPayloadMachineEventParser;
-import com.rbkmoney.sink.common.serialization.impl.PaymentEventPayloadDeserializer;
-import com.rbkmoney.sink.common.serialization.impl.PaymentEventPayloadSerializer;
+import dev.vality.damsel.payment_processing.EventPayload;
+import dev.vality.machinegun.eventsink.MachineEvent;
+import dev.vality.machinegun.msgpack.Value;
+import dev.vality.sink.common.parser.impl.PaymentEventPayloadMachineEventParser;
+import dev.vality.sink.common.serialization.impl.PaymentEventPayloadDeserializer;
+import dev.vality.sink.common.serialization.impl.PaymentEventPayloadSerializer;
import org.junit.Test;
import java.util.Collections;
@@ -25,7 +25,8 @@ public class ParserTest {
MachineEvent machineEvent = random(MachineEvent.class, "data");
machineEvent.setData(Value.bin(serializeEventPayload));
- PaymentEventPayloadMachineEventParser parser = new PaymentEventPayloadMachineEventParser(new PaymentEventPayloadDeserializer());
+ PaymentEventPayloadMachineEventParser parser =
+ new PaymentEventPayloadMachineEventParser(new PaymentEventPayloadDeserializer());
EventPayload actualEventPayload = parser.parse(machineEvent);
assertEquals(expectedEventPayload, actualEventPayload);
diff --git a/src/test/java/com/rbkmoney/sink/common/serialization/SerializationTest.java b/src/test/java/dev/vality/sink/common/serialization/SerializationTest.java
similarity index 72%
rename from src/test/java/com/rbkmoney/sink/common/serialization/SerializationTest.java
rename to src/test/java/dev/vality/sink/common/serialization/SerializationTest.java
index 13c1a17..8e42850 100644
--- a/src/test/java/com/rbkmoney/sink/common/serialization/SerializationTest.java
+++ b/src/test/java/dev/vality/sink/common/serialization/SerializationTest.java
@@ -1,8 +1,8 @@
-package com.rbkmoney.sink.common.serialization;
+package dev.vality.sink.common.serialization;
-import com.rbkmoney.damsel.payment_processing.EventPayload;
-import com.rbkmoney.sink.common.serialization.impl.PaymentEventPayloadDeserializer;
-import com.rbkmoney.sink.common.serialization.impl.PaymentEventPayloadSerializer;
+import dev.vality.damsel.payment_processing.EventPayload;
+import dev.vality.sink.common.serialization.impl.PaymentEventPayloadDeserializer;
+import dev.vality.sink.common.serialization.impl.PaymentEventPayloadSerializer;
import org.junit.Test;
import java.util.Collections;