## org.jgroups.protocols.pbcast
Class CoordGmsImpl

    java.lang.Object
      org.jgroups.protocols.pbcast.GmsImpl
          org.jgroups.protocols.pbcast.ServerGmsImpl
              org.jgroups.protocols.pbcast.CoordGmsImpl

    public class CoordGmsImpl

extends ServerGmsImpl

Coordinator role of the Group MemberShip (GMS) protocol. Accepts JOIN and LEAVE requests and emits view changes accordingly.

Author:
  Bela Ban

Nested Class Summary

Nested classes/interfaces inherited from class org.jgroups.protocols.pbcast.GmsImpl
`GmsImpl.Request`

Field Summary

Fields inherited from class org.jgroups.protocols.pbcast.GmsImpl
`gms, log, merger`

Constructor Summary
`CoordGmsImpl(GMS g)`

Method Summary
`MergeId` `getMergeId()`
`void` `handleMembershipChange(java.util.Collection<GmsImpl.Request> requests)`
`void` `handleMergeCancelled(MergeId merge_id)`
`void` `handleMergeResponse(MergeData data, MergeId merge_id)`
`void` `handleViewChange(View new_view, Digest digest)` Called by the GMS when a VIEW is received.
`void` `init()`
`void` `join(Address mbr, boolean useFlushIfPresent)`
`void` `joinWithStateTransfer(Address mbr, boolean useFlushIfPresent)`
`void` `leave(Address mbr)` The coordinator itself wants to leave the group
`void` `merge(java.util.Map<Address,View> views)` Invoked upon receiving a MERGE event from the MERGE layer.
`void` `stop()`
`void` `suspect(Address mbr)`

Methods inherited from class org.jgroups.protocols.pbcast.ServerGmsImpl
`handleDigestResponse, handleMergeRequest, handleMergeView`

Methods inherited from class org.jgroups.protocols.pbcast.GmsImpl
`handleJoinResponse, handleLeaveResponse, iWouldBeCoordinator, sendMergeRejectedResponse, start, unsuspect, wrongMethod`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CoordGmsImpl

    public CoordGmsImpl(GMS g)

Method Detail

### getMergeId

    public MergeId getMergeId()

### init

    public void init()
              throws java.lang.Exception

  Overrides:
    `init` in class `GmsImpl`
  Throws:
    `java.lang.Exception`

### join

    public void join(Address mbr,
                     boolean useFlushIfPresent)

  Specified by:
    `join` in class `GmsImpl`

### joinWithStateTransfer

    public void joinWithStateTransfer(Address mbr,
                                      boolean useFlushIfPresent)

  Specified by:
    `joinWithStateTransfer` in class `GmsImpl`

### leave

    public void leave(Address mbr)

  The coordinator itself wants to leave the group

  Specified by:
    `leave` in class `GmsImpl`

### suspect

    public void suspect(Address mbr)

  Overrides:
    `suspect` in class `GmsImpl`

### merge

    public void merge(java.util.Map<Address,View> views)

  Invoked upon receiving a MERGE event from the MERGE layer. Starts the merge protocol. See description of protocol in DESIGN.

  Overrides:
    `merge` in class `GmsImpl`
  Parameters:
    `views` - A List of different views detected by the merge protocol

### handleMergeResponse

    public void handleMergeResponse(MergeData data,
                                    MergeId merge_id)

  Overrides:
    `handleMergeResponse` in class `GmsImpl`

### handleMergeCancelled

    public void handleMergeCancelled(MergeId merge_id)

  Overrides:
    `handleMergeCancelled` in class `GmsImpl`

### handleMembershipChange

    public void handleMembershipChange(java.util.Collection<GmsImpl.Request> requests)

  Overrides:
    `handleMembershipChange` in class `GmsImpl`

### handleViewChange

    public void handleViewChange(View new_view,
                                 Digest digest)

  Called by the GMS when a VIEW is received.

  Overrides:
    `handleViewChange` in class `GmsImpl`
  Parameters:
    `new_view` - The view to be installed
    `digest` - If view is a MergeView, digest contains the seqno digest of all members and has to be set by GMS

### stop

    public void stop()

  Overrides:
    `stop` in class `GmsImpl`

Copyright © 1998-2009 Bela Ban / Red Hat. All Rights Reserved.