Skip to content
Snippets Groups Projects
Commit e294c07c authored by Christian Wulf's avatar Christian Wulf
Browse files

added actor names

parent a83311d6
No related branches found
No related tags found
No related merge requests found
...@@ -42,12 +42,13 @@ public class CounterActor extends UntypedActor { ...@@ -42,12 +42,13 @@ public class CounterActor extends UntypedActor {
private void onTerminating() { private void onTerminating() {
LOGGER.debug("Terminating..."); LOGGER.debug("Terminating...");
LOGGER.trace("Current thread: " + Thread.currentThread());
} }
@Override @Override
public void postStop() throws Exception { public void postStop() throws Exception {
LOGGER.info("stopped: " + numMessages + " messages"); LOGGER.trace("Threads (" + threads.size() + "): " + threads);
LOGGER.debug("Threads (" + threads.size() + "): " + threads); LOGGER.info(self().path().name() + ": " + numMessages + " messages");
super.postStop(); super.postStop();
} }
} }
...@@ -100,9 +100,6 @@ public class TcpRecordReconstructionActor extends UntypedActor { ...@@ -100,9 +100,6 @@ public class TcpRecordReconstructionActor extends UntypedActor {
} }
private void terminate() { private void terminate() {
// ActorSelection rootActorSelection = context().system().actorSelection(self().path().root());
// ActorRef rootActor = rootActorSelection.anchor();
// rootActor.tell(PoisonPill.getInstance(), rootActor);
self().tell(PoisonPill.getInstance(), getSelf()); self().tell(PoisonPill.getInstance(), getSelf());
} }
......
...@@ -38,8 +38,8 @@ public class TcpTraceReconstructionActor extends UntypedActor implements ISendTr ...@@ -38,8 +38,8 @@ public class TcpTraceReconstructionActor extends UntypedActor implements ISendTr
final Props validTraceReceiverProps, final Props invalidTraceReceiverProps, final ActorRef watchActor) { final Props validTraceReceiverProps, final Props invalidTraceReceiverProps, final ActorRef watchActor) {
super(); super();
this.reconstructor = new TraceReconstructor(traceId2trace, this); this.reconstructor = new TraceReconstructor(traceId2trace, this);
this.validTraceReceiver = context().actorOf(validTraceReceiverProps); this.validTraceReceiver = context().actorOf(validTraceReceiverProps, "Valid-receiver");
this.invalidTraceReceiver = context().actorOf(invalidTraceReceiverProps); this.invalidTraceReceiver = context().actorOf(invalidTraceReceiverProps, "Invalid-receiver");
watchActor.tell(new WatchMe(getSelf()), getSelf()); watchActor.tell(new WatchMe(getSelf()), getSelf());
} }
...@@ -48,6 +48,7 @@ public class TcpTraceReconstructionActor extends UntypedActor implements ISendTr ...@@ -48,6 +48,7 @@ public class TcpTraceReconstructionActor extends UntypedActor implements ISendTr
public void onReceive(final Object message) throws Exception { public void onReceive(final Object message) throws Exception {
if (LOGGER.isTraceEnabled()) { if (LOGGER.isTraceEnabled()) {
LOGGER.trace("onReceive: " + message); LOGGER.trace("onReceive: " + message);
LOGGER.trace("Current thread: " + Thread.currentThread());
} }
threads.add(Thread.currentThread()); threads.add(Thread.currentThread());
...@@ -71,7 +72,8 @@ public class TcpTraceReconstructionActor extends UntypedActor implements ISendTr ...@@ -71,7 +72,8 @@ public class TcpTraceReconstructionActor extends UntypedActor implements ISendTr
} }
private void onTerminating() { private void onTerminating() {
LOGGER.trace("traces left: " + reconstructor.getTraceId2trace().keySet()); LOGGER.debug("traces left: " + reconstructor.getTraceId2trace().keySet());
LOGGER.trace("Current thread: " + Thread.currentThread());
reconstructor.terminate(); reconstructor.terminate();
LOGGER.debug("Threads (" + threads.size() + "): " + threads); LOGGER.debug("Threads (" + threads.size() + "): " + threads);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment