commit | f1377cefcf42110f808b1c291b35e56728f02004 | [log] [tgz] |
---|---|---|
author | Pavlin Radoslavov <pavlin@onlab.us> | Wed Feb 05 17:37:24 2014 -0800 |
committer | Pavlin Radoslavov <pavlin@onlab.us> | Thu Feb 20 20:00:09 2014 -0800 |
tree | b131638db9cf616cdb13773c46568d0257d29e07 | |
parent | afbf103f7007c1813bbbf90c834494f342509bec [diff] [blame] |
Add a mechanism to elect a single leader in an ONOS cluster (ONOS-977). Note: For now, leadership change callbacks are intentionally not implemented, to discourage from liberally using this feature. In the future we might have to add the callback support, but only if really needed. Change-Id: Ia70045aee737fbd67ec445ea7065476e3f4838aa
diff --git a/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java b/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java index 69e7b3e..422949a 100755 --- a/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java +++ b/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java
@@ -69,6 +69,11 @@ } @Override + public boolean isClusterLeader() { + return true; + } + + @Override public String getControllerId() { return controllerId; }