org.jgroups.protocols.pbcast

## Class GmsImpl

- java.lang.Object
- - org.jgroups.protocols.pbcast.GmsImpl

- Direct Known Subclasses:
    ClientGmsImpl, ServerGmsImpl

      public abstract class GmsImpl
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GmsImpl.Request`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected GMS` | `gms`
    `protected Log` | `log`
    `protected Merger` | `merger`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `GmsImpl(GMS gms)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleDigestResponse(Address sender, Digest digest)`
    `void` | `handleJoinResponse(JoinRsp join_rsp)`
    `void` | `handleLeaveResponse()`
    `void` | `handleMembershipChange(java.util.Collection<GmsImpl.Request> requests)`
    `void` | `handleMergeCancelled(MergeId merge_id)`
    `void` | `handleMergeRequest(Address sender, MergeId merge_id, java.util.Collection<? extends Address> mbrs)`
    `void` | `handleMergeResponse(MergeData data, MergeId merge_id)`
    `void` | `handleMergeView(MergeData data, MergeId merge_id)`
    `void` | `handleViewChange(View new_view, Digest digest)`
    `void` | `init()`
    `protected boolean` | `iWouldBeCoordinator(java.util.Vector<Address> new_mbrs)` Returns potential coordinator based on lexicographic ordering of member addresses.
    `abstract void` | `join(Address mbr, boolean useFlushIfPresent)`
    `abstract void` | `joinWithStateTransfer(Address local_addr, boolean useFlushIfPresent)`
    `abstract void` | `leave(Address mbr)`
    `void` | `merge(java.util.Map<Address,View> views)`
    `protected void` | `sendMergeRejectedResponse(Address sender, MergeId merge_id)`
    `void` | `start()`
    `void` | `stop()`
    `void` | `suspect(Address mbr)`
    `void` | `unsuspect(Address mbr)`
    `protected void` | `wrongMethod(java.lang.String method_name)`

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

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

- - ### Field Detail

    - #### gms

          protected final GMS gms

    - #### merger

          protected final Merger merger

    - #### log

          protected final Log log

  - ### Constructor Detail

    - #### GmsImpl

          protected GmsImpl(GMS gms)

  - ### Method Detail

    - #### join

          public abstract void join(Address mbr,
                  boolean useFlushIfPresent)

    - #### joinWithStateTransfer

          public abstract void joinWithStateTransfer(Address local_addr,
                                   boolean useFlushIfPresent)

    - #### leave

          public abstract void leave(Address mbr)

    - #### handleJoinResponse

          public void handleJoinResponse(JoinRsp join_rsp)

    - #### handleLeaveResponse

          public void handleLeaveResponse()

    - #### suspect

          public void suspect(Address mbr)

    - #### unsuspect

          public void unsuspect(Address mbr)

    - #### merge

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

    - #### handleMergeRequest

          public void handleMergeRequest(Address sender,
                                MergeId merge_id,
                                java.util.Collection<? extends Address> mbrs)

    - #### handleMergeResponse

          public void handleMergeResponse(MergeData data,
                                 MergeId merge_id)

    - #### handleMergeView

          public void handleMergeView(MergeData data,
                             MergeId merge_id)

    - #### handleMergeCancelled

          public void handleMergeCancelled(MergeId merge_id)

    - #### handleDigestResponse

          public void handleDigestResponse(Address sender,
                                  Digest digest)

    - #### handleMembershipChange

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

    - #### handleViewChange

          public void handleViewChange(View new_view,
                              Digest digest)

    - #### init

          public void init()
                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### start

          public void start()
                     throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### stop

          public void stop()

    - #### sendMergeRejectedResponse

          protected void sendMergeRejectedResponse(Address sender,
                                       MergeId merge_id)

    - #### wrongMethod

          protected void wrongMethod(java.lang.String method_name)

    - #### iWouldBeCoordinator

          protected boolean iWouldBeCoordinator(java.util.Vector<Address> new_mbrs)

      Returns potential coordinator based on lexicographic ordering of member addresses. Another approach would be to keep track of the primary partition and return the first member if we are the primary partition.

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