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

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

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

Util.interruptAndWaitToDie介绍

暂无

代码示例

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

public static boolean interruptAndWaitToDie(Thread t) {
  return interruptAndWaitToDie(t,Global.THREAD_SHUTDOWN_WAIT_TIME);
}

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

@Override
public void destroy() {
  super.destroy();
  if (delayed_message_handler != null)
    Util.interruptAndWaitToDie(delayed_message_handler);
}

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

@Override
public void stop() {
  if(running.compareAndSet(true, false)) {
    Util.close(srv_sock);
    Util.interruptAndWaitToDie(acceptor);
    super.stop();
  }
}

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

public void stop() {
  Thread tmp=t;
  if(t != null)
    t=null;
  if(tmp != null) {
    Util.interruptAndWaitToDie(tmp);
  }
}

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

public static boolean interruptAndWaitToDie(Thread t) {
  return interruptAndWaitToDie(t, Global.THREAD_SHUTDOWN_WAIT_TIME);
}

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

public static boolean interruptAndWaitToDie(Thread t) {
  return interruptAndWaitToDie(t,Global.THREAD_SHUTDOWN_WAIT_TIME);
}

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

void stop() {
  is_it_running=false;
  if(send_queue != null)
    send_queue.clear();
  if(senderThread != null) {
    Thread tmp=senderThread;
    senderThread=null;
    Util.interruptAndWaitToDie(tmp);
  }
}

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

@Override
public void destroy() {
  super.destroy();
  if (delayed_message_handler != null)
    Util.interruptAndWaitToDie(delayed_message_handler);
}

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

@Override
public void stop() {
  if(running.compareAndSet(true, false)) {
    Util.close(srv_sock);
    Util.interruptAndWaitToDie(acceptor);
    super.stop();
  }
}

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

void destroy() {
  is_running=false;
  closeSocket(); // should terminate handler as well
  if(sender != null)
    sender.stop();
  Thread tmp=receiverThread;
  receiverThread=null;
  if(tmp != null) {
    Util.interruptAndWaitToDie(tmp);
  }
}

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

/** Closes all open sockets, the server socket and all threads waiting for incoming messages */
public void stop() {
  super.stop();
  // 1. Stop the reaper
  if(reaper != null)
    reaper.stop();
  // 2. close the server socket (this also stops the acceptor thread)
  if(srv_sock != null) {
    try {
      ServerSocket tmp=srv_sock;
      srv_sock=null;
      tmp.close();
      if(acceptor != null)
        Util.interruptAndWaitToDie(acceptor);
    }
    catch(Exception e) {
    }
  }
  // 3. then close the connections       
  Collection<Connection> connsCopy=null;
  synchronized(conns) {
    connsCopy=new LinkedList<Connection>(conns.values());
    conns.clear();
  }        
  for(Connection conn:connsCopy) {                
    conn.destroy();
  }
  connsCopy.clear();        
  local_addr=null;
}

相关文章

Util类方法