diff --git a/pom.xml b/pom.xml index 2d802cb679..edb3997c7e 100644 --- a/pom.xml +++ b/pom.xml @@ -118,8 +118,9 @@ 2.2.21 2.17.0 6.1.6 + 9.6.0 + 1.0.2 9.5.0 - 2.8.5 2.0.0.AM27 4.5.14 2.6.2 @@ -925,7 +926,7 @@ org.glassfish.jersey.ext jersey-spring6 - 3.1.5 + 3.1.6 org.springframework @@ -993,41 +994,41 @@ - + - com.typesafe.akka - akka-actor_2.12 - ${akka.version} + org.apache.pekko + pekko-actor_2.13 + ${pekko.version} - com.typesafe.akka - akka-cluster_2.12 - ${akka.version} + org.apache.pekko + pekko-cluster_2.13 + ${pekko.version} - com.typesafe.akka - akka-cluster-tools_2.12 - ${akka.version} + org.apache.pekko + pekko-cluster-tools_2.13 + ${pekko.version} - com.typesafe.akka - akka-testkit_2.12 - ${akka.version} + org.apache.pekko + pekko-testkit_2.13 + ${pekko.version} - com.typesafe.akka - akka-persistence_2.12 - ${akka.version} + org.apache.pekko + pekko-persistence_2.13 + ${pekko.version} - com.typesafe.akka - akka-slf4j_2.12 - ${akka.version} + org.apache.pekko + pekko-slf4j_2.13 + ${pekko.version} - com.typesafe.akka - akka-distributed-data_2.12 - ${akka.version} + org.apache.pekko + pekko-distributed-data_2.13 + ${pekko.version} org.reflections @@ -1084,7 +1085,7 @@ org.seleniumhq.selenium selenium-java - 4.19.0 + 4.19.1 io.dropwizard.metrics diff --git a/roda-core/roda-core-tests/pom.xml b/roda-core/roda-core-tests/pom.xml index 760d2d504c..5d5dcfa09f 100644 --- a/roda-core/roda-core-tests/pom.xml +++ b/roda-core/roda-core-tests/pom.xml @@ -119,8 +119,8 @@ hamcrest-all - com.typesafe.akka - akka-testkit_2.12 + org.apache.pekko + pekko-testkit_2.13 commons-io diff --git a/roda-core/roda-core-tests/src/main/resources/config/roda-test.properties b/roda-core/roda-core-tests/src/main/resources/config/roda-test.properties index 854b8dcc9b..82b55d9b9f 100644 --- a/roda-core/roda-core-tests/src/main/resources/config/roda-test.properties +++ b/roda-core/roda-core-tests/src/main/resources/config/roda-test.properties @@ -105,3 +105,20 @@ core.tools.mimetype.image/png = png core.tools.mimetype.image/tiff = tiff tif dng core.tools.mimetype.image/jpeg = jpg jpeg jpe spf +########################################################################## +# LDAP settings +########################################################################## +core.ldap.startServer = false +#core.ldap.adminDN = uid=admin,ou=system +core.ldap.adminDN = cn=admin,dc=roda,dc=org +core.ldap.adminPassword = roda +core.ldap.passwordDigestAlgorithm = PKCS5S2 +core.ldap.baseDN = dc=roda,dc=org +core.ldap.peopleDN = ou=users,dc=roda,dc=org +core.ldap.groupsDN = ou=groups,dc=roda,dc=org +core.ldap.rolesDN = ou=roles,dc=roda,dc=org +core.ldap.rodaGuestDN = uid=guest,ou=users,dc=roda,dc=org +core.ldap.rodaAdminDN = uid=admin,ou=users,dc=roda,dc=org +core.ldap.rodaAdministratorsDN = cn=administrators,ou=groups,dc=roda,dc=org + + diff --git a/roda-core/roda-core/pom.xml b/roda-core/roda-core/pom.xml index 696d7e5d61..4f782f7d0f 100644 --- a/roda-core/roda-core/pom.xml +++ b/roda-core/roda-core/pom.xml @@ -324,28 +324,28 @@ - com.typesafe.akka - akka-actor_2.12 + org.apache.pekko + pekko-actor_2.13 - com.typesafe.akka - akka-cluster_2.12 + org.apache.pekko + pekko-cluster_2.13 - com.typesafe.akka - akka-cluster-tools_2.12 + org.apache.pekko + pekko-cluster-tools_2.13 - com.typesafe.akka - akka-persistence_2.12 + org.apache.pekko + pekko-persistence_2.13 - com.typesafe.akka - akka-slf4j_2.12 + org.apache.pekko + pekko-slf4j_2.13 - com.typesafe.akka - akka-distributed-data_2.12 + org.apache.pekko + pekko-distributed-data_2.13 com.github.jknack diff --git a/roda-core/roda-core/src/main/java/org/roda/core/common/akka/AkkaBaseActor.java b/roda-core/roda-core/src/main/java/org/roda/core/common/akka/AkkaBaseActor.java index b099603145..da8e38d82f 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/common/akka/AkkaBaseActor.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/common/akka/AkkaBaseActor.java @@ -16,7 +16,7 @@ import com.codahale.metrics.MetricRegistry; -import akka.actor.UntypedAbstractActor; +import org.apache.pekko.actor.UntypedAbstractActor; public abstract class AkkaBaseActor extends UntypedAbstractActor { diff --git a/roda-core/roda-core/src/main/java/org/roda/core/common/akka/AkkaUtils.java b/roda-core/roda-core/src/main/java/org/roda/core/common/akka/AkkaUtils.java index 22c24238e8..8e244c684e 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/common/akka/AkkaUtils.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/common/akka/AkkaUtils.java @@ -9,6 +9,7 @@ import java.io.IOException; import java.io.InputStream; +import java.nio.charset.StandardCharsets; import org.apache.commons.io.IOUtils; import org.roda.core.RodaCoreFactory; @@ -31,7 +32,7 @@ public static Config getAkkaConfiguration(String configFilename) { try (InputStream originStream = RodaCoreFactory .getConfigurationFileAsStream(RodaConstants.CORE_ORCHESTRATOR_FOLDER + "/" + configFilename)) { - String configAsString = IOUtils.toString(originStream, RodaConstants.DEFAULT_ENCODING); + String configAsString = IOUtils.toString(originStream, StandardCharsets.UTF_8); akkaConfig = ConfigFactory.parseString(configAsString); } catch (IOException e) { LOGGER.error("Could not load Akka configuration '{}'", configFilename, e); diff --git a/roda-core/roda-core/src/main/java/org/roda/core/common/akka/DeadLetterActor.java b/roda-core/roda-core/src/main/java/org/roda/core/common/akka/DeadLetterActor.java index 02d805591c..4cb4e52da2 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/common/akka/DeadLetterActor.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/common/akka/DeadLetterActor.java @@ -10,8 +10,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.DeadLetter; -import akka.actor.UntypedAbstractActor; +import org.apache.pekko.actor.DeadLetter; +import org.apache.pekko.actor.UntypedAbstractActor; public class DeadLetterActor extends UntypedAbstractActor { private static final Logger LOGGER = LoggerFactory.getLogger(DeadLetterActor.class); diff --git a/roda-core/roda-core/src/main/java/org/roda/core/common/akka/Messages.java b/roda-core/roda-core/src/main/java/org/roda/core/common/akka/Messages.java index 991457ecfe..9919df623c 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/common/akka/Messages.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/common/akka/Messages.java @@ -13,6 +13,7 @@ import java.util.Map; import java.util.Optional; +import org.apache.pekko.actor.ActorRef; import org.roda.core.data.v2.IsRODAObject; import org.roda.core.data.v2.LiteOptionalWithCause; import org.roda.core.data.v2.SerializableOptional; @@ -29,8 +30,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; - public class Messages { private static final Logger LOGGER = LoggerFactory.getLogger(Messages.class); diff --git a/roda-core/roda-core/src/main/java/org/roda/core/events/akka/AkkaEventsHandlerAndNotifier.java b/roda-core/roda-core/src/main/java/org/roda/core/events/akka/AkkaEventsHandlerAndNotifier.java index 3b32d3176f..0fe8eb8840 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/events/akka/AkkaEventsHandlerAndNotifier.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/events/akka/AkkaEventsHandlerAndNotifier.java @@ -8,12 +8,20 @@ package org.roda.core.events.akka; import java.io.IOException; +import java.io.Serial; import java.net.InetAddress; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeoutException; import org.apache.commons.lang3.StringUtils; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.Address; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.dispatch.OnComplete; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.ZooDefs; @@ -34,18 +42,12 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Address; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.cluster.Cluster; -import akka.dispatch.OnComplete; import scala.concurrent.Await; import scala.concurrent.Future; import scala.concurrent.duration.Duration; public class AkkaEventsHandlerAndNotifier extends AbstractEventsHandler implements EventsNotifier { + @Serial private static final long serialVersionUID = 919188071375009042L; private static final Logger LOGGER = LoggerFactory.getLogger(AkkaEventsHandlerAndNotifier.class); diff --git a/roda-core/roda-core/src/main/java/org/roda/core/events/akka/AkkaEventsHandlerAndNotifierActor.java b/roda-core/roda-core/src/main/java/org/roda/core/events/akka/AkkaEventsHandlerAndNotifierActor.java index 774d765b8b..d9d62fc5f3 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/events/akka/AkkaEventsHandlerAndNotifierActor.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/events/akka/AkkaEventsHandlerAndNotifierActor.java @@ -7,6 +7,7 @@ */ package org.roda.core.events.akka; +import java.io.Serial; import java.util.Collections; import java.util.Date; import java.util.HashMap; @@ -15,6 +16,17 @@ import java.util.Set; import java.util.concurrent.TimeUnit; +import org.apache.pekko.actor.AbstractActor; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.cluster.Cluster; +import org.apache.pekko.cluster.ddata.DistributedData; +import org.apache.pekko.cluster.ddata.GSet; +import org.apache.pekko.cluster.ddata.GSetKey; +import org.apache.pekko.cluster.ddata.Key; +import org.apache.pekko.cluster.ddata.ORMap; +import org.apache.pekko.cluster.ddata.Replicator; +import org.apache.pekko.cluster.ddata.Replicator.Changed; +import org.apache.pekko.cluster.ddata.Replicator.Update; import org.roda.core.RodaCoreFactory; import org.roda.core.common.akka.Messages.EventGroupCreated; import org.roda.core.common.akka.Messages.EventGroupDeleted; @@ -22,29 +34,13 @@ import org.roda.core.common.akka.Messages.EventUserCreated; import org.roda.core.common.akka.Messages.EventUserDeleted; import org.roda.core.common.akka.Messages.EventUserUpdated; +import org.roda.core.data.common.SecureString; import org.roda.core.data.v2.user.Group; import org.roda.core.data.v2.user.User; import org.roda.core.events.EventsHandler; -import org.roda.core.data.common.SecureString; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.AbstractActor; -import akka.actor.ActorRef; -import akka.cluster.Cluster; -import akka.cluster.ddata.DistributedData; -import akka.cluster.ddata.GSet; -import akka.cluster.ddata.GSetKey; -import akka.cluster.ddata.Key; -import akka.cluster.ddata.ORMap; -import akka.cluster.ddata.Replicator.Changed; -import akka.cluster.ddata.Replicator.Subscribe; -import akka.cluster.ddata.Replicator.Update; -import akka.cluster.ddata.Replicator.UpdateFailure; -import akka.cluster.ddata.Replicator.UpdateSuccess; -import akka.cluster.ddata.Replicator.WriteAll; -import akka.cluster.ddata.Replicator.WriteConsistency; -import akka.cluster.ddata.Replicator.WriteMajority; import scala.Option; import scala.concurrent.duration.Duration; @@ -65,7 +61,7 @@ public class AkkaEventsHandlerAndNotifierActor extends AbstractActor { private final Key> objectKeysKey = GSetKey.create("objectKeys"); private Set objectKeys = new HashSet<>(); - private final WriteConsistency writeConsistency; + private final Replicator.WriteConsistency writeConsistency; public AkkaEventsHandlerAndNotifierActor(final EventsHandler eventsHandler, final String writeConsistency, final int writeConsistencyTimeoutInSeconds) { @@ -74,19 +70,19 @@ public AkkaEventsHandlerAndNotifierActor(final EventsHandler eventsHandler, fina this.writeConsistency = instantiateWriteConsistency(writeConsistency, writeConsistencyTimeoutInSeconds); } - private WriteConsistency instantiateWriteConsistency(String writeConsistency, + private Replicator.WriteConsistency instantiateWriteConsistency(String writeConsistency, final int writeConsistencyTimeoutInSeconds) { if ("WriteAll".equalsIgnoreCase(writeConsistency)) { - return new WriteAll(Duration.create(writeConsistencyTimeoutInSeconds, TimeUnit.SECONDS)); + return new Replicator.WriteAll(Duration.create(writeConsistencyTimeoutInSeconds, TimeUnit.SECONDS)); } else { - return new WriteMajority(Duration.create(writeConsistencyTimeoutInSeconds, TimeUnit.SECONDS)); + return new Replicator.WriteMajority(Duration.create(writeConsistencyTimeoutInSeconds, TimeUnit.SECONDS)); } } @Override public void preStart() { - Subscribe> subscribe = new Subscribe<>(objectKeysKey, getSelf()); + Replicator.Subscribe> subscribe = new Replicator.Subscribe<>(objectKeysKey, getSelf()); replicator.tell(subscribe, ActorRef.noSender()); } @@ -96,39 +92,40 @@ public Receive createReceive() { .match(EventUserUpdated.class, e -> handleUserUpdated(e)).match(EventUserDeleted.class, e -> handleUserDeleted(e)) .match(EventGroupCreated.class, e -> handleGroupCreated(e)) .match(EventGroupUpdated.class, e -> handleGroupUpdated(e)) - .match(EventGroupDeleted.class, e -> handleGroupDeleted(e)).match(Changed.class, c -> handleChanged(c)) - .match(UpdateSuccess.class, e -> handleUpdateSuccess(e)).match(UpdateFailure.class, e -> handleUpdateFailure(e)) + .match(EventGroupDeleted.class, e -> handleGroupDeleted(e)).match(Replicator.Changed.class, c -> handleChanged(c)) + .match(Replicator.UpdateSuccess.class, e -> handleUpdateSuccess(e)) + .match(Replicator.UpdateFailure.class, e -> handleUpdateFailure(e)) .matchAny(msg -> { LOGGER.warn("Received unknown message '{}'", msg); }).build(); } - private void handleUpdateSuccess(UpdateSuccess e) { + private void handleUpdateSuccess(Replicator.UpdateSuccess e) { // LOGGER.info("handleUpdateSuccess '{}'", e); // FIXME 20180925 hsilva: do nothing??? } - private void handleUpdateFailure(UpdateFailure e) { + private void handleUpdateFailure(Replicator.UpdateFailure e) { // LOGGER.info("handleUpdateFailure '{}'", e); // FIXME 20180925 hsilva: what to do??? } - private void handleChanged(Changed e) { + private void handleChanged(Replicator.Changed e) { if (e.key().equals(objectKeysKey)) { - handleObjectKeysChanged((Changed>) e); + handleObjectKeysChanged((Replicator.Changed>) e); } else if (e.key() instanceof ObjectKey) { handleObjectChanged((Changed>) e); } } - private void handleObjectKeysChanged(Changed> e) { + private void handleObjectKeysChanged(Replicator.Changed> e) { Set newKeys = e.dataValue().getElements(); Set keysToSubscribe = new HashSet<>(newKeys); keysToSubscribe.removeAll(objectKeys); keysToSubscribe.forEach(keyToSubscribe -> { // subscribe to get notifications of when objects with this name are // added or removed - replicator.tell(new Subscribe<>(keyToSubscribe, self()), self()); + replicator.tell(new Replicator.Subscribe<>(keyToSubscribe, self()), self()); }); objectKeys = newKeys; @@ -136,7 +133,7 @@ private void handleObjectKeysChanged(Changed> e) { keysToSubscribe = null; } - private void handleObjectChanged(Changed> e) { + private void handleObjectChanged(Replicator.Changed> e) { String objectId = e.key().id().replaceFirst(CACHE_PREFIX, ""); Option option = e.dataValue().get(objectId); if (option.isDefined()) { @@ -248,6 +245,7 @@ private ObjectKey dataKey(String entryKey) { } public static class ObjectKey extends Key> { + @Serial private static final long serialVersionUID = 4859356839497209682L; public ObjectKey(String eventKey) { diff --git a/roda-core/roda-core/src/main/java/org/roda/core/events/akka/CRDTSerializer.java b/roda-core/roda-core/src/main/java/org/roda/core/events/akka/CRDTSerializer.java index c7cf2a8d90..1cec459cc3 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/events/akka/CRDTSerializer.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/events/akka/CRDTSerializer.java @@ -16,7 +16,7 @@ import java.io.ObjectOutput; import java.io.ObjectOutputStream; -import akka.serialization.SerializerWithStringManifest; +import org.apache.pekko.serialization.SerializerWithStringManifest; public class CRDTSerializer extends SerializerWithStringManifest { diff --git a/roda-core/roda-core/src/main/java/org/roda/core/events/akka/CRDTWrapper.java b/roda-core/roda-core/src/main/java/org/roda/core/events/akka/CRDTWrapper.java index c8019c2b7a..d9901ed308 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/events/akka/CRDTWrapper.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/events/akka/CRDTWrapper.java @@ -7,18 +7,20 @@ */ package org.roda.core.events.akka; +import java.io.Serial; import java.util.HashMap; import java.util.Map; +import org.apache.pekko.cluster.ddata.AbstractReplicatedData; +import org.apache.pekko.cluster.ddata.ReplicatedData; +import org.apache.pekko.cluster.ddata.ReplicatedDataSerialization; import org.roda.core.data.v2.IsRODAObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.cluster.ddata.AbstractReplicatedData; -import akka.cluster.ddata.ReplicatedDataSerialization; - public class CRDTWrapper extends AbstractReplicatedData - implements IsRODAObject, ReplicatedDataSerialization { + implements IsRODAObject, ReplicatedDataSerialization, ReplicatedData { + @Serial private static final long serialVersionUID = -9133998132086063749L; private static final Logger LOGGER = LoggerFactory.getLogger(CRDTWrapper.class); diff --git a/roda-core/roda-core/src/main/java/org/roda/core/plugins/base/synchronization/proccess/SynchronizeInstancePlugin.java b/roda-core/roda-core/src/main/java/org/roda/core/plugins/base/synchronization/proccess/SynchronizeInstancePlugin.java index 81cd6ed177..a9d718b260 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/plugins/base/synchronization/proccess/SynchronizeInstancePlugin.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/plugins/base/synchronization/proccess/SynchronizeInstancePlugin.java @@ -45,7 +45,6 @@ import org.roda.core.storage.StorageService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import scala.concurrent.java8.FuturesConvertersImpl; /** * @author Gabriel Barros diff --git a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/AkkaEmbeddedPluginOrchestrator.java b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/AkkaEmbeddedPluginOrchestrator.java index 5718999627..a36e960dad 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/AkkaEmbeddedPluginOrchestrator.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/AkkaEmbeddedPluginOrchestrator.java @@ -17,6 +17,14 @@ import java.util.concurrent.TimeoutException; import org.apache.commons.lang3.StringUtils; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.actor.AllDeadLetters; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.dispatch.OnComplete; +import org.apache.pekko.pattern.Patterns; +import org.apache.pekko.util.Timeout; import org.roda.core.RodaCoreFactory; import org.roda.core.common.akka.AkkaUtils; import org.roda.core.common.akka.DeadLetterActor; @@ -68,14 +76,6 @@ import com.typesafe.config.Config; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.AllDeadLetters; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.dispatch.OnComplete; -import akka.pattern.Patterns; -import akka.util.Timeout; import scala.concurrent.Await; import scala.concurrent.Future; import scala.concurrent.duration.Duration; diff --git a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaBackgroundJobActor.java b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaBackgroundJobActor.java index ba85438ed7..77c900368f 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaBackgroundJobActor.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaBackgroundJobActor.java @@ -9,6 +9,11 @@ import java.util.Optional; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.japi.pf.DeciderBuilder; import org.roda.core.common.akka.AkkaBaseActor; import org.roda.core.common.akka.Messages; import org.roda.core.data.exceptions.GenericException; @@ -29,12 +34,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.japi.pf.DeciderBuilder; - /** * @author Miguel Guimarães */ diff --git a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobActor.java b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobActor.java index ed10fab047..3051cfe070 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobActor.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobActor.java @@ -9,6 +9,11 @@ import java.util.Optional; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.japi.pf.DeciderBuilder; import org.roda.core.common.akka.AkkaBaseActor; import org.roda.core.common.akka.Messages; import org.roda.core.data.exceptions.GenericException; @@ -29,12 +34,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.japi.pf.DeciderBuilder; - public class AkkaJobActor extends AkkaBaseActor { private static final Logger LOGGER = LoggerFactory.getLogger(AkkaJobActor.class); diff --git a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobStateInfoActor.java b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobStateInfoActor.java index 4c8bff9876..0515e18ad9 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobStateInfoActor.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobStateInfoActor.java @@ -10,6 +10,10 @@ import java.util.ArrayList; import java.util.Optional; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.Terminated; +import org.apache.pekko.routing.RoundRobinPool; import org.roda.core.common.akka.AkkaBaseActor; import org.roda.core.common.akka.Messages; import org.roda.core.data.exceptions.AuthorizationDeniedException; @@ -39,11 +43,6 @@ import com.codahale.metrics.MetricRegistry; import com.google.common.collect.Iterables; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.actor.Terminated; -import akka.routing.RoundRobinPool; - public class AkkaJobStateInfoActor extends AkkaBaseActor { private static final Logger LOGGER = LoggerFactory.getLogger(AkkaJobStateInfoActor.class); diff --git a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobsManager.java b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobsManager.java index 99076017b6..55fd43d682 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobsManager.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaJobsManager.java @@ -18,6 +18,9 @@ import java.util.concurrent.PriorityBlockingQueue; import java.util.concurrent.TimeUnit; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.Props; +import org.apache.pekko.routing.RoundRobinPool; import org.roda.core.RodaCoreFactory; import org.roda.core.common.akka.AkkaBaseActor; import org.roda.core.common.akka.Messages; @@ -25,9 +28,9 @@ import org.roda.core.common.akka.Messages.JobsManagerReleaseAllLocks; import org.roda.core.common.akka.Messages.JobsManagerReleaseLock; import org.roda.core.data.v2.jobs.Job; +import org.roda.core.data.v2.jobs.JobParallelism; import org.roda.core.data.v2.jobs.JobStats; import org.roda.core.data.v2.jobs.PluginType; -import org.roda.core.data.v2.jobs.JobParallelism; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,9 +38,6 @@ import com.codahale.metrics.Histogram; import com.codahale.metrics.MetricRegistry; -import akka.actor.ActorRef; -import akka.actor.Props; -import akka.routing.RoundRobinPool; import scala.concurrent.duration.Duration; public class AkkaJobsManager extends AkkaBaseActor { diff --git a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaLimitedJobActor.java b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaLimitedJobActor.java index bceb4a0393..30499a05ad 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaLimitedJobActor.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/AkkaLimitedJobActor.java @@ -9,6 +9,11 @@ import java.util.Optional; +import org.apache.pekko.actor.ActorRef; +import org.apache.pekko.actor.OneForOneStrategy; +import org.apache.pekko.actor.Props; +import org.apache.pekko.actor.SupervisorStrategy; +import org.apache.pekko.japi.pf.DeciderBuilder; import org.roda.core.common.akka.AkkaBaseActor; import org.roda.core.common.akka.Messages; import org.roda.core.data.exceptions.GenericException; @@ -28,12 +33,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import akka.actor.ActorRef; -import akka.actor.OneForOneStrategy; -import akka.actor.Props; -import akka.actor.SupervisorStrategy; -import akka.japi.pf.DeciderBuilder; - /** * @author Miguel Guimarãese */ diff --git a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/mailbox/PrioritizedMailbox.java b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/mailbox/PrioritizedMailbox.java index 5e039735c9..5cfa9b682f 100644 --- a/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/mailbox/PrioritizedMailbox.java +++ b/roda-core/roda-core/src/main/java/org/roda/core/plugins/orchestrate/akka/mailbox/PrioritizedMailbox.java @@ -11,9 +11,9 @@ import com.typesafe.config.Config; -import akka.actor.ActorSystem; -import akka.dispatch.PriorityGenerator; -import akka.dispatch.UnboundedStablePriorityMailbox; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.dispatch.PriorityGenerator; +import org.apache.pekko.dispatch.UnboundedStablePriorityMailbox; /** * @author Miguel Guimarães