Package com.linkedin.databus.groupleader.pub

Examples of com.linkedin.databus.groupleader.pub.AcceptLeadershipCallback


    String baseName = "/databus2.testGroupLeaderSimple";
    LOG.info("Before joining group: groupName=" + _groupName + "; memberName=" + _memberName +
      "; leadershipInfo=" + _groupLeadershipConn.getGroupLeadershipInfo(baseName,_groupName));

    GroupLeadershipSession groupLeadershipSession = _groupLeadershipConn.joinGroup(baseName,
      _groupName, _memberName, new AcceptLeadershipCallback()
      {
        @Override
        public void doAcceptLeadership(GroupLeadershipSession groupLeadershipSession)
        {
          LOG.info("Accepting leadership: " + groupLeadershipSession);
View Full Code Here


        String groupName = "TestLeaderElect.testLeaderElectSimple";
        cleanZkGroupInfo(baseName,groupName);

        final AtomicReference<String> callerMaintainedCurrentLeaderRef = new AtomicReference<String>();

        AcceptLeadershipCallback saveCurrentLeaderCallback =
            new AcceptLeadershipCallback()
        {
          @Override
          public void doAcceptLeadership(GroupLeadershipSession groupLeadershipSession)
          {
            callerMaintainedCurrentLeaderRef.set(groupLeadershipSession.getMemberName());
View Full Code Here

  public synchronized boolean join()
  {
    if (null != _groupConnection)
    {
      AcceptLeadershipCallback leaderCallback  = (_callback != null) ? _callback : this.new DefaultLeaderCallBack();
      _groupSession = _groupConnection.joinGroup(getDomainName(),getGroupName(), getName(),leaderCallback);
      if ((_sharedDataPath!=null) && !_sharedDataPath.isEmpty())
      {
        _groupSession.setSharedDataPath(_sharedDataPath);
      }
View Full Code Here

TOP

Related Classes of com.linkedin.databus.groupleader.pub.AcceptLeadershipCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.