com.h3c.dist.groups

## Class GroupInfo

- java.lang.Object
- - com.h3c.dist.groups.GroupInfo

- All Implemented Interfaces:
    Serializable

      public class GroupInfo
      extends Object
      implements Serializable

  Place holder for the attributes of a application group `Groups`. Applications while creating a group sets parameters like group type, leader election mechanism, heart beat interval etc., in GroupInfo object and pass it to the Groups service.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GroupInfo.ElectionType` ElectionType enum lists possible election types
    `static class` | `GroupInfo.GroupType` GroupType enum lists possible supported group types

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `bAutoRunElection`
    `GroupInfo.ElectionType` | `eType` Following members are meaningful only if gType is ONE_ACTIVE
    `GroupInfo.GroupType` | `gType` By default all members of the group are active
    `static int` | `heartBeatInterval` Metric in millisecond format.
    `String` | `lastElectionRunBy` App instance of the group that ran election last time
    `long` | `lastLeaderChangeTime` Time the leader of the group changed last time
    `String` | `leaderId` Current leader identifier

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GroupInfo()`
    `GroupInfo(GroupInfo copy)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isConfigSame(GroupInfo o)` This routine is used to compare a groupInfo object is same the current.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### gType

          public GroupInfo.GroupType gType

      By default all members of the group are active

    - #### eType

          public GroupInfo.ElectionType eType

      Following members are meaningful only if gType is ONE_ACTIVE

    - #### bAutoRunElection

          public boolean bAutoRunElection

    - #### heartBeatInterval

          public static final int heartBeatInterval

      Metric in millisecond format. Fail detect in 2 * heartBeatInterval
      See Also:
        Constant Field Values

    - #### leaderId

          public String leaderId

      Current leader identifier

    - #### lastElectionRunBy

          public String lastElectionRunBy

      App instance of the group that ran election last time

    - #### lastLeaderChangeTime

          public long lastLeaderChangeTime

      Time the leader of the group changed last time

  - ### Constructor Detail

    - #### GroupInfo

          public GroupInfo()

    - #### GroupInfo

          public GroupInfo(GroupInfo copy)

  - ### Method Detail

    - #### isConfigSame

          public boolean isConfigSame(GroupInfo o)

      This routine is used to compare a groupInfo object is same the current.
      Parameters:
        `o` - - group info object
      Returns:
        boolean true - if group info is same, false - otherwise

Copyright © 2014. All Rights Reserved.