X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fweb%2Froot%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fweb%2FClusterNodeBean.java;h=974fdee1f673378d6abb819ba9b6c21af122c79e;hp=5e4f22afe2edc823afa29a45fcfa4c8b44da90c0;hb=405ea7ce68d22bd3d2501857c5253793b581b086;hpb=077d639121c9add40e4fe1c2e59711d7764e8d2e diff --git a/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/ClusterNodeBean.java b/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/ClusterNodeBean.java index 5e4f22afe2..974fdee1f6 100644 --- a/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/ClusterNodeBean.java +++ b/opendaylight/web/root/src/main/java/org/opendaylight/controller/web/ClusterNodeBean.java @@ -1,3 +1,10 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. 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.web; import java.net.InetAddress; @@ -11,6 +18,7 @@ public class ClusterNodeBean { private final String name; private final Boolean me; private final Boolean coordinator; + private final Integer numConnectedNodes; public static class Builder { // required params @@ -20,6 +28,7 @@ public class ClusterNodeBean { // optional params private Boolean me = null; private Boolean coordinator = null; + private Integer numConnectedNodes = null; public Builder(InetAddress address) { this.address = address.getAddress(); @@ -36,6 +45,11 @@ public class ClusterNodeBean { return this; } + public Builder nodesConnected(int numNodes) { + this.numConnectedNodes = numNodes; + return this; + } + public ClusterNodeBean build() { return new ClusterNodeBean(this); } @@ -46,5 +60,6 @@ public class ClusterNodeBean { this.name = builder.name; this.me = builder.me; this.coordinator = builder.coordinator; + this.numConnectedNodes = builder.numConnectedNodes; } -} \ No newline at end of file +}