org.jgroups.util.Util.determineLeftMembers()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(185)

本文整理了Java中org.jgroups.util.Util.determineLeftMembers()方法的一些代码示例,展示了Util.determineLeftMembers()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.determineLeftMembers()方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:determineLeftMembers

Util.determineLeftMembers介绍

[英]Returns all members that left between 2 views. All members that are element of old_mbrs but not element of new_mbrs are returned.
[中]返回在两个视图之间保留的所有成员。返回属于旧_mbr元素但不属于新_mbr元素的所有成员。

代码示例

代码示例来源:origin: wildfly/wildfly

protected void handleViewChange(View view) {
  List<Address> new_mbrs=view.getMembers();
  List<Address> left_mbrs=Util.determineLeftMembers(members, new_mbrs);
  members.clear();
  members.addAll(new_mbrs);
  for(Address mbr: left_mbrs) {
    // the new view doesn't contain the sender, it must have left, hence we will clear its fragmentation tables
    fragment_list.remove(mbr);
    log.trace("%s: removed %s from fragmentation table", local_addr, mbr);
  }
}

代码示例来源:origin: wildfly/wildfly

protected void handleViewChange(View view) {
  List<Address> new_mbrs=view.getMembers();
  List<Address> left_mbrs=Util.determineLeftMembers(members, new_mbrs);
  members.clear();
  members.addAll(new_mbrs);
  for(Address mbr: left_mbrs) {
    // the new view doesn't contain the sender, it must have left, hence we will clear its fragmentation tables
    fragment_list.remove(mbr);
    log.trace("%s: removed %s from fragmentation table", local_addr, mbr);
  }
}

代码示例来源:origin: wildfly/wildfly

private void handleViewChange(View view) {
  List<Address> new_mbrs=view.getMembers();
  List<Address> left_mbrs=Util.determineLeftMembers(members, new_mbrs);
  members.clear();
  members.addAll(new_mbrs);
  for(Address mbr: left_mbrs){
    // the new view doesn't contain the sender, it must have left,
    // hence we will clear all of itsfragmentation tables
    fragment_list.remove(mbr);
    if(log.isTraceEnabled())
      log.trace("[VIEW_CHANGE] removed " + mbr + " from fragmentation table");
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protected void handleViewChange(View view) {
  List<Address> new_mbrs=view.getMembers();
  List<Address> left_mbrs=Util.determineLeftMembers(members, new_mbrs);
  members.clear();
  members.addAll(new_mbrs);
  for(Address mbr: left_mbrs) {
    // the new view doesn't contain the sender, it must have left, hence we will clear its fragmentation tables
    fragment_list.remove(mbr);
    log.trace("%s: removed %s from fragmentation table", local_addr, mbr);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protected void handleViewChange(View view) {
  List<Address> new_mbrs=view.getMembers();
  List<Address> left_mbrs=Util.determineLeftMembers(members, new_mbrs);
  members.clear();
  members.addAll(new_mbrs);
  for(Address mbr: left_mbrs) {
    // the new view doesn't contain the sender, it must have left, hence we will clear its fragmentation tables
    fragment_list.remove(mbr);
    log.trace("%s: removed %s from fragmentation table", local_addr, mbr);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

private void handleViewChange(View view) {
  List<Address> new_mbrs=view.getMembers();
  List<Address> left_mbrs=Util.determineLeftMembers(members, new_mbrs);
  members.clear();
  members.addAll(new_mbrs);
  for(Address mbr: left_mbrs){
    // the new view doesn't contain the sender, it must have left,
    // hence we will clear all of itsfragmentation tables
    fragment_list.remove(mbr);
    if(log.isTraceEnabled())
      log.trace("[VIEW_CHANGE] removed " + mbr + " from fragmentation table");
  }
}

代码示例来源:origin: it.unimi.di.law/jai4j

/** Synchronizes the internal view of job managers with a JGroups view: instantiates dropping threads for
 * known job managers that are being suspected and handles new job managers.
 *
 * @param newView the new JGroups view.
 */
@Override
public void viewAccepted( final View newView ) {
  LOGGER.info( "New JGroups view {}", newView );
  // The first time, the view is null.
  final List<Address> members;
  if ( jGroupsView != null ) members = jGroupsView.getMembers();
  else members = Collections.emptyList();
  // First we examine job managers that disappeared from the view.
  for ( Address deletedMember: Util.determineLeftMembers( members, newView.getMembers() ) ) {
    if ( deletedMember instanceof JAI4JAddress ) {
      final JAI4JAddress address = (JAI4JAddress)deletedMember;
      if ( address.weight != 0 ) {
        final JGroupsRemoteJobManager<J> jGroupsRemoteJobManager = identifier2RemoteJobManager.get( address.name );
        if ( jGroupsRemoteJobManager == null ) LOGGER.error( "Spurious deleted address " + deletedMember );
        else jGroupsRemoteJobManager.suspect( droppingThreadFactory.createThread( jGroupsRemoteJobManager ) );
      }
    }
  }
  final List<org.jgroups.Address> newMembers = Util.determineLeftMembers( newView.getMembers(), members );
  LOGGER.info( "New members: {}", newMembers );
  for ( org.jgroups.Address newMember : newMembers )
    if ( newMember instanceof JAI4JAddress ) refresh( (JAI4JAddress)newMember );
  jGroupsView = newView;
  if ( LOGGER.isDebugEnabled() ) LOGGER.debug( "Current JGroups view: {}", newView );
}

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

Address mbr;
left_mbrs=Util.determineLeftMembers(members, new_mbrs);
members.clear();
members.addAll(new_mbrs);

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

Address mbr;
left_mbrs=Util.determineLeftMembers(members, new_mbrs);
members.clear();
members.addAll(new_mbrs);

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

view=(View)evt.getArg();
Vector<Address> new_members=view != null? view.getMembers() : null;
Vector<Address> left_members=Util.determineLeftMembers(old_members, new_members);

代码示例来源:origin: org.jgroups/com.springsource.org.jgroups

Vector<Address> left_members;
synchronized(members) {
  left_members=Util.determineLeftMembers(members, new_members);
  members.clear();
  if(new_members != null)

相关文章

Util类方法