⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gestorpooling.java

📁 java 实现的P2P Chord算法。chord算法是结构式的P2P搜索与管理协议
💻 JAVA
字号:
/* * GestorPooling.java * * Created on 14 de abril de 2005, 15:48 */package org.mikel.jchord.red;import java.util.*;/** * * @author mikel */public class GestorPooling {        private Vector colaEjecutables;        /** Creates a new instance of GestorPoolThreads */    public GestorPooling(int tama駉) {                colaEjecutables = new Vector(1,10);        for(int i=0; i<tama駉; i++){            new EjecutorParaPool(this);                }    }        synchronized void esperarEjecucion (EjecutorParaPool ejecutor) throws InterruptedException{                      while(colaEjecutables.size()==0)            wait();                Runnable e = (Runnable) colaEjecutables.elementAt(0);        colaEjecutables.removeElementAt(0);        ejecutor.ejecutar(e);              }        synchronized void a馻dir(Runnable r){            colaEjecutables.addElement(r);        notify();        }    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -