📍Use lombok, reformat, and optimize the code (#1560)

* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
va1m
2021-03-13 13:19:21 +01:00
committed by GitHub
parent 0e26a6adb5
commit 5cf2fe009b
681 changed files with 2472 additions and 4966 deletions
@@ -23,8 +23,7 @@
package com.iluwatar.saga.choreography;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
/**
* This pattern is used in distributed services to perform a group of operations atomically. This is
@@ -44,8 +43,8 @@ import org.slf4j.LoggerFactory;
* @see com.iluwatar.saga.choreography.Saga
* @see Service
*/
@Slf4j
public class SagaApplication {
private static final Logger LOGGER = LoggerFactory.getLogger(SagaApplication.class);
/**
* main method.
@@ -23,8 +23,7 @@
package com.iluwatar.saga.orchestration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
/**
* This pattern is used in distributed services to perform a group of operations atomically. This is
@@ -45,8 +44,8 @@ import org.slf4j.LoggerFactory;
* @see SagaOrchestrator
* @see Service
*/
@Slf4j
public class SagaApplication {
private static final Logger LOGGER = LoggerFactory.getLogger(SagaApplication.class);
/**
* method to show common saga logic.
@@ -28,16 +28,15 @@ import static com.iluwatar.saga.orchestration.Saga.Result.CRASHED;
import static com.iluwatar.saga.orchestration.Saga.Result.FINISHED;
import static com.iluwatar.saga.orchestration.Saga.Result.ROLLBACK;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
/**
* The orchestrator that manages all the transactions and directs the participant services to
* execute local transactions based on events.
*/
@Slf4j
public class SagaOrchestrator {
private static final Logger LOGGER = LoggerFactory.getLogger(SagaOrchestrator.class);
private final Saga saga;
private final ServiceDiscoveryService sd;
private final CurrentState state;