X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fcommon%2Factor%2FExecuteInSelfMessage.java;fp=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fcommon%2Factor%2FExecuteInSelfMessage.java;h=1b14e48a985ecf7238b7bd317ff129417fc08e31;hb=2fbe52114715d041bd216ca5fd349b8288f7a2a4;hp=0000000000000000000000000000000000000000;hpb=866cdf141262dd7b57e95b3e3aa75709b7d0c586;p=controller.git diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/ExecuteInSelfMessage.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/ExecuteInSelfMessage.java new file mode 100644 index 0000000000..1b14e48a98 --- /dev/null +++ b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/ExecuteInSelfMessage.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * 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.common.actor; + +import static java.util.Objects.requireNonNull; + +import akka.dispatch.ControlMessage; +import org.eclipse.jdt.annotation.NonNull; + +/** + * Message internal to {@link ExecuteInSelfActor} implementations in this package. + * + * @author Robert Varga + */ +final class ExecuteInSelfMessage implements ControlMessage { + private final Runnable runnable; + + ExecuteInSelfMessage(final @NonNull Runnable runnable) { + this.runnable = requireNonNull(runnable); + } + + void run() { + runnable.run(); + } +}