add roleInfo structure and backup_changed mastership event

Change-Id: Iedee219fe250d681377d73a50a71f5fa72cd7802
diff --git a/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java b/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java
index bd7462d..7b8531c 100644
--- a/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java
+++ b/core/api/src/main/java/org/onlab/onos/mastership/MastershipEvent.java
@@ -11,7 +11,7 @@
 
     //do we worry about explicitly setting slaves/equals? probably not,
     //to keep it simple
-    NodeId master;
+    NodeId node;
 
     /**
      * Type of mastership events.
@@ -20,7 +20,12 @@
         /**
          * Signifies that the master for a device has changed.
          */
-        MASTER_CHANGED
+        MASTER_CHANGED,
+
+        /**
+         * Signifies that the list of backup nodes has changed.
+         */
+        BACKUPS_CHANGED
     }
 
     /**
@@ -29,11 +34,11 @@
      *
      * @param type   device event type
      * @param device event device subject
-     * @param master master ID subject
+     * @param node master ID subject
      */
-    public MastershipEvent(Type type, DeviceId device, NodeId master) {
+    public MastershipEvent(Type type, DeviceId device, NodeId node) {
         super(type, device);
-        this.master = master;
+        this.node = node;
     }
 
     /**
@@ -47,15 +52,15 @@
      */
     public MastershipEvent(Type type, DeviceId device, NodeId master, long time) {
         super(type, device, time);
-        this.master = master;
+        this.node = master;
     }
 
     /**
-     * Returns the current master's ID as a subject.
+     * Returns the NodeID of the node responsible for triggering the event.
      *
-     * @return master ID subject
+     * @return node ID as a subject
      */
-    public NodeId master() {
-        return master;
+    public NodeId node() {
+        return node;
     }
 }