X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FClusterWrapperImpl.java;h=857510ad4b5360ef3870ac16bce00e188cee88a7;hb=25bcd8a39d1c06f45d7f567d1f240276c7007310;hp=8910137ec4583272b55ead555b0ed12e11caa02c;hpb=bc7b4edec3c868a14e0a0de3a3b8e1af2406448b;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ClusterWrapperImpl.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ClusterWrapperImpl.java index 8910137ec4..857510ad4b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ClusterWrapperImpl.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ClusterWrapperImpl.java @@ -17,6 +17,7 @@ import com.google.common.base.Preconditions; public class ClusterWrapperImpl implements ClusterWrapper { private final Cluster cluster; private final String currentMemberName; + private final String selfAddress; public ClusterWrapperImpl(ActorSystem actorSystem){ Preconditions.checkNotNull(actorSystem, "actorSystem should not be null"); @@ -31,6 +32,7 @@ public class ClusterWrapperImpl implements ClusterWrapper { ); currentMemberName = (String) cluster.getSelfRoles().toArray()[0]; + selfAddress = cluster.selfAddress().toString(); } @@ -45,4 +47,8 @@ public class ClusterWrapperImpl implements ClusterWrapper { public String getCurrentMemberName() { return currentMemberName; } + + public String getSelfAddress() { + return selfAddress; + } }