There is not benefit in the guards, making them pure overhead.
Change-Id: I75e310a2f08e5650db436bb4a7f46d85cbde313d
Signed-off-by: Robert Varga <rovarga@cisco.com>
protected final Logger LOG = LoggerFactory.getLogger(getClass());
protected final Logger LOG = LoggerFactory.getLogger(getClass());
- public AbstractUntypedPersistentActor() {
- if(LOG.isTraceEnabled()) {
- LOG.trace("Actor created {}", getSelf());
- }
- getContext().
- system().
- actorSelection("user/termination-monitor").
- tell(new Monitor(getSelf()), getSelf());
-
+ protected AbstractUntypedPersistentActor() {
+ LOG.trace("Actor created {}", getSelf());
+ getContext().system().actorSelection("user/termination-monitor").tell(new Monitor(getSelf()), getSelf());
-
- @Override public void onReceiveCommand(Object message) throws Exception {
+ @Override
+ public void onReceiveCommand(Object message) throws Exception {
final String messageType = message.getClass().getSimpleName();
final String messageType = message.getClass().getSimpleName();
- if(LOG.isTraceEnabled()) {
- LOG.trace("Received message {}", messageType);
- }
+ LOG.trace("Received message {}", messageType);
+
- if(LOG.isTraceEnabled()) {
- LOG.trace("Done handling message {}", messageType);
- }
+ LOG.trace("Done handling message {}", messageType);
- @Override public void onReceiveRecover(Object message) throws Exception {
+ @Override
+ public void onReceiveRecover(Object message) throws Exception {
final String messageType = message.getClass().getSimpleName();
final String messageType = message.getClass().getSimpleName();
- if(LOG.isTraceEnabled()) {
- LOG.trace("Received message {}", messageType);
- }
+ LOG.trace("Received message {}", messageType);
- if(LOG.isTraceEnabled()) {
- LOG.trace("Done handling message {}", messageType);
- }
-
+ LOG.trace("Done handling message {}", messageType);
}
protected abstract void handleRecover(Object message) throws Exception;
}
protected abstract void handleRecover(Object message) throws Exception;
}
protected void unknownMessage(Object message) throws Exception {
}
protected void unknownMessage(Object message) throws Exception {
- if(LOG.isDebugEnabled()) {
- LOG.debug("Received unhandled message {}", message);
- }
+ LOG.debug("Received unhandled message {}", message);