* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.cluster.example;
import akka.actor.ActorRef;
import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import org.opendaylight.controller.cluster.example.messages.KeyValue;
import org.opendaylight.controller.cluster.example.messages.KeyValueSaved;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class ClientActor extends UntypedActor {
+public class ClientActor extends UntypedAbstractActor {
private static final Logger LOG = LoggerFactory.getLogger(ClientActor.class);
private final ActorRef target;
- public ClientActor(ActorRef target) {
+ public ClientActor(final ActorRef target) {
this.target = target;
}
return Props.create(ClientActor.class, target);
}
- @Override public void onReceive(Object message) {
+ @Override
+ public void onReceive(final Object message) {
if (message instanceof KeyValue) {
target.tell(message, getSelf());
} else if (message instanceof KeyValueSaved) {
import akka.actor.PoisonPill;
import akka.actor.Props;
import akka.actor.ReceiveTimeout;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import com.google.common.base.Preconditions;
import java.util.concurrent.TimeoutException;
import org.opendaylight.controller.cluster.raft.base.messages.CaptureSnapshot;
*
* @author Thomas Pantelis
*/
-class GetSnapshotReplyActor extends UntypedActor {
+class GetSnapshotReplyActor extends UntypedAbstractActor {
private static final Logger LOG = LoggerFactory.getLogger(GetSnapshotReplyActor.class);
private final Params params;
import static org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor.expectFirstMatching;
import static org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor.expectMatching;
+import akka.actor.AbstractActor;
import akka.actor.ActorRef;
import akka.actor.Props;
-import akka.actor.UntypedActor;
import akka.dispatch.Dispatchers;
import akka.testkit.TestActorRef;
import akka.testkit.javadsl.TestKit;
assertEquals("Server config", Sets.newHashSet(expected), Sets.newHashSet(payload.getServerConfig()));
}
- private static RaftActorContextImpl newFollowerContext(String id, TestActorRef<? extends UntypedActor> actor) {
+ private static RaftActorContextImpl newFollowerContext(String id, TestActorRef<? extends AbstractActor> actor) {
DefaultConfigParamsImpl configParams = new DefaultConfigParamsImpl();
configParams.setHeartBeatInterval(new FiniteDuration(100, TimeUnit.MILLISECONDS));
configParams.setElectionTimeoutFactor(100000);
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.cluster.raft.utils;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
-public class DoNothingActor extends UntypedActor {
- @Override public void onReceive(Object message) {
+public class DoNothingActor extends UntypedAbstractActor {
+ @Override
+ public void onReceive(final Object message) throws Exception {
}
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.cluster.raft.utils;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
/**
* The EchoActor simply responds back with the same message that it receives.
*/
-public class EchoActor extends UntypedActor {
-
+public class EchoActor extends UntypedAbstractActor {
@Override
- public void onReceive(Object message) {
+ public void onReceive(final Object message) {
getSender().tell(message, getSelf());
}
}
import akka.actor.ActorRef;
import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import akka.dispatch.ControlMessage;
import akka.pattern.Patterns;
import akka.util.Timeout;
import scala.concurrent.duration.Duration;
import scala.concurrent.duration.FiniteDuration;
-public class MessageCollectorActor extends UntypedActor {
+public class MessageCollectorActor extends UntypedAbstractActor {
private static final String ARE_YOU_READY = "ARE_YOU_READY";
public static final String GET_ALL_MESSAGES = "messages";
package org.opendaylight.controller.cluster.common.actor;
import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import akka.japi.Effect;
import akka.remote.ThisActorSystemQuarantinedEvent;
import org.slf4j.Logger;
* @author Gary Wu gary.wu1@huawei.com
*
*/
-public class QuarantinedMonitorActor extends UntypedActor {
+public class QuarantinedMonitorActor extends UntypedAbstractActor {
private static final Logger LOG = LoggerFactory.getLogger(QuarantinedMonitorActor.class);
import akka.actor.ActorSystem;
import akka.actor.DeadLetter;
import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import akka.testkit.TestKit;
import com.typesafe.config.ConfigFactory;
import java.util.concurrent.TimeUnit;
/**
* For testing.
*/
- public static class PingPongActor extends UntypedActor {
+ public static class PingPongActor extends UntypedAbstractActor {
ReentrantLock lock;
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.cluster.datastore;
import akka.actor.Terminated;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import org.opendaylight.controller.cluster.common.actor.Monitor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class TerminationMonitor extends UntypedActor {
+public class TerminationMonitor extends UntypedAbstractActor {
private static final Logger LOG = LoggerFactory.getLogger(TerminationMonitor.class);
public static final String ADDRESS = "termination-monitor";
}
@Override
- public void onReceive(Object message) {
+ public void onReceive(final Object message) {
if (message instanceof Terminated) {
Terminated terminated = (Terminated) message;
LOG.debug("Actor terminated : {}", terminated.actor());
import akka.actor.Props;
import akka.actor.ReceiveTimeout;
import akka.actor.Status.Failure;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
*
* @author Thomas Pantelis
*/
-final class ShardManagerGetSnapshotReplyActor extends UntypedActor {
+final class ShardManagerGetSnapshotReplyActor extends UntypedAbstractActor {
private static final Logger LOG = LoggerFactory.getLogger(ShardManagerGetSnapshotReplyActor.class);
private final Set<String> remainingShardNames;
import akka.actor.ActorSelection;
import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import akka.dispatch.Dispatchers;
import akka.dispatch.Futures;
import akka.testkit.TestActorRef;
assertEquals("canCommit", expected, actual);
}
- private static class CohortActor extends UntypedActor {
+ private static class CohortActor extends UntypedAbstractActor {
private final Builder builder;
private final AtomicInteger canCommitCount = new AtomicInteger();
private final AtomicInteger commitCount = new AtomicInteger();
import akka.actor.ActorSystem;
import akka.actor.Address;
import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import akka.dispatch.Futures;
import akka.japi.Creator;
import akka.testkit.TestActorRef;
private static class TestMessage {
}
- private static final class MockShardManager extends UntypedActor {
+ private static final class MockShardManager extends UntypedAbstractActor {
private final boolean found;
private final ActorRef actorRef;
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.cluster.datastore.utils;
import akka.actor.ActorRef;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
-public final class ForwardingActor extends UntypedActor {
+public final class ForwardingActor extends UntypedAbstractActor {
private final ActorRef target;
private ForwardingActor(final ActorRef target) {
public void onReceive(final Object obj) {
target.forward(obj, context());
}
-
}
package org.opendaylight.controller.dummy.datastore;
import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import com.google.common.base.Stopwatch;
import java.util.concurrent.TimeUnit;
import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class DummyShard extends UntypedActor {
+public class DummyShard extends UntypedAbstractActor {
private static final Logger LOG = LoggerFactory.getLogger(DummyShard.class);
private final Configuration configuration;
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.dummy.datastore;
-import akka.actor.ActorContext;
import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
-public class DummyShardManager extends UntypedActor {
- public DummyShardManager(Configuration configuration, String memberName, String[] shardNames,
- String type) {
- new DummyShardsCreator(configuration, context(), memberName, shardNames, type).create();
+public class DummyShardManager extends UntypedAbstractActor {
+ public DummyShardManager(final Configuration configuration, final String memberName, final String[] shardNames,
+ final String type) {
+ new DummyShardsCreator(configuration, getContext(), memberName, shardNames, type).create();
}
@Override
- public void onReceive(Object message) {
+ public void onReceive(final Object message) {
}
- public static Props props(Configuration configuration, String memberName, String[] shardNames, String type) {
+ public static Props props(final Configuration configuration, final String memberName, final String[] shardNames,
+ final String type) {
return Props.create(DummyShardManager.class, configuration, memberName, shardNames, type);
}
private final String[] shardNames;
private final String type;
- DummyShardsCreator(Configuration configuration, ActorContext actorSystem, String memberName,
- String[] shardNames, String type) {
+ DummyShardsCreator(final Configuration configuration, final ActorContext actorSystem, final String memberName,
+ final String[] shardNames, final String type) {
this.configuration = configuration;
this.actorSystem = actorSystem;
this.memberName = memberName;
package org.opendaylight.controller.remote.rpc;
import akka.actor.Terminated;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import org.opendaylight.controller.cluster.common.actor.Monitor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class TerminationMonitor extends UntypedActor {
+public class TerminationMonitor extends UntypedAbstractActor {
private static final Logger LOG = LoggerFactory.getLogger(TerminationMonitor.class);
public TerminationMonitor() {
import akka.actor.ActorSystem;
import akka.actor.Props;
-import akka.actor.UntypedActor;
+import akka.actor.UntypedAbstractActor;
import akka.testkit.TestActorRef;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
Assert.assertEquals(expectedTimeout.toMillis(), config.getMailBoxPushTimeout().toMillis());
}
- public static class ConfigTestActor extends UntypedActor {
+ public static class ConfigTestActor extends UntypedAbstractActor {
private final Config actorSystemConfig;