From 2293086ee270d300bd8b5144825f8061a4d0b624 Mon Sep 17 00:00:00 2001 From: Stefan Maute Date: Mon, 29 Aug 2022 07:29:21 +0200 Subject: [PATCH] Review: minor code formatting change Signed-off-by: Stefan Maute --- .../persistence/actors/PolicySupervisorActor.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActor.java b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActor.java index 8e130988e5..6050541463 100755 --- a/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActor.java +++ b/policies/service/src/main/java/org/eclipse/ditto/policies/service/persistence/actors/PolicySupervisorActor.java @@ -39,11 +39,12 @@ import akka.actor.Props; /** - * Supervisor for {@link org.eclipse.ditto.policies.service.persistence.actors.PolicyPersistenceActor} which means it will create, start and watch it as child actor. + * Supervisor for {@link org.eclipse.ditto.policies.service.persistence.actors.PolicyPersistenceActor} which means + * it will create, start and watch it as child actor. *

* If the child terminates, it will wait for the calculated exponential back-off time and restart it afterwards. - * Between the termination of the child and the restart, this actor answers to all requests with a {@link - * PolicyUnavailableException} as fail fast strategy. + * Between the termination of the child and the restart, this actor answers to all requests with a + * {@link PolicyUnavailableException} as fail fast strategy. */ public final class PolicySupervisorActor extends AbstractPersistenceSupervisor> { @@ -87,7 +88,6 @@ private PolicySupervisorActor(final ActorRef pubSubMediator, public static Props props(final ActorRef pubSubMediator, final DistributedPub> policyAnnouncementPub, @Nullable final BlockedNamespaces blockedNamespaces) { - return Props.create(PolicySupervisorActor.class, () -> new PolicySupervisorActor(pubSubMediator, policyAnnouncementPub, blockedNamespaces)); } @@ -112,6 +112,7 @@ protected ExponentialBackOffConfig getExponentialBackOffConfig() { final DittoPoliciesConfig policiesConfig = DittoPoliciesConfig.of( DefaultScopedConfig.dittoScoped(getContext().getSystem().settings().config()) ); + return policiesConfig.getPolicyConfig().getSupervisorConfig().getExponentialBackOffConfig(); } @@ -123,6 +124,7 @@ protected ShutdownBehaviour getShutdownBehaviour(final PolicyId entityId) { @Override protected DittoRuntimeExceptionBuilder getUnavailableExceptionBuilder(@Nullable final PolicyId entityId) { final PolicyId policyId = entityId != null ? entityId : PolicyId.of("UNKNOWN:ID"); + return PolicyUnavailableException.newBuilder(policyId); } @@ -135,6 +137,7 @@ private Props getAnnouncementManagerProps(final DistributedPub