亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? node.java

?? Chord package into p2psim
?? JAVA
字號(hào):
/***************************************************************************
 *                                                                         *
 *                                Node.java                                *
 *                            -------------------                          *
 *   date                 : 16.08.2004                                     *
 *   copyright            : (C) 2004-2008 Distributed and                  *
 *                              Mobile Systems Group                       *
 *                              Lehrstuhl fuer Praktische Informatik       *
 *                              Universitaet Bamberg                       *
 *                              http://www.uni-bamberg.de/pi/              *
 *   email                : sven.kaffille@uni-bamberg.de                   *
 *                          karsten.loesing@uni-bamberg.de                 *
 *                                                                         *
 *                                                                         *
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   A copy of the license can be found in the license.txt file supplied   *
 *   with this software or at: http://www.gnu.org/copyleft/gpl.html        *
 *                                                                         *
 ***************************************************************************/
package de.uniba.wiai.lspi.chord.com;

import java.util.List;
import java.util.Set;

import de.uniba.wiai.lspi.chord.data.ID;
import de.uniba.wiai.lspi.chord.data.URL;

/**
 * Provides methods which remote nodes can invoke.
 * 
 * @author Sven Kaffille, Karsten Loesing
 * @version 1.0.5
 */

/*
 * 21.03.2006 changed by sven. Node needs not to be Serializable as no instances
 * of it are supposed to being serialized.
 */
public abstract class Node {

	@Override
	public final boolean equals(Object arg0) {
		if (arg0 == null || !(arg0 instanceof Node)) {
			return false;
		}
		return ((Node) arg0).nodeID.equals(this.nodeID);
	}

	@Override
	public final int hashCode() {
		return this.nodeID.hashCode();
	}

	@Override
	public String toString() {
		String id = null; 
		if (this.nodeID != null) {
			id = this.nodeID.toString(); 
		} 
		String url = "null"; 
		if (this.nodeURL != null) {
			url = this.nodeURL.toString(); 
		} 
		return "Node[type=" + this.getClass().getSimpleName() + ", id="
				+ id + ", url=" + url + "]";
	}

	/**
	 * This is the id of this node. It has to be set by every implementation of
	 * this class!
	 */
	protected ID nodeID;

	/**
	 * This is the url of this node. It has to be set by every implementation of
	 * this class!
	 */
	protected URL nodeURL;

	/**
	 * Returns the ID of a node. Is invoked by remote nodes which do not know
	 * the ID of this node, yet. After invocation, the nodeID is remembered by
	 * the remote node, s.t. future invocations of getNodeID are unnecessary.
	 * 
	 * @return ID of a node.
	 * @throws CommunicationException
	 *             If something goes wrong when contacting the node.
	 */
	public final ID getNodeID() {
		return this.nodeID;
	}

	/**
	 * 
	 * @return
	 */
	public final URL getNodeURL() {
		return this.nodeURL;
	}

	/**
	 * Returns the Chord node which is responsible for the given key.
	 * 
	 * @param key
	 *            Key for which the successor is searched for.
	 * @return Responsible node.
	 * @throws CommunicationException
	 *             Thrown if an unresolvable communication failure occurs.
	 */
	public abstract Node findSuccessor(ID key) throws CommunicationException;

	/**
	 * Requests this node's predecessor in result[0] and successor list in
	 * result[1..length-1]. This method is invoked by another node which thinks
	 * it is this node's predecessor.
	 * 
	 * @param potentialPredecessor
	 * @return A list containing the predecessor at first position of the list
	 *         and the successors in the rest of the list.
	 * @throws CommunicationException
	 *             Thrown if an unresolvable communication failure occurs.
	 */
	public abstract List<Node> notify(Node potentialPredecessor)
			throws CommunicationException;

	/**
	 * Requests this node's predecessor, successor list and entries.
	 * 
	 * @param potentialPredecessor
	 *            Remote node which invokes this method
	 * @return References to predecessor and successors and the entries this
	 *         node will be responsible for.
	 * @throws CommunicationException
	 */
	public abstract RefsAndEntries notifyAndCopyEntries(
			Node potentialPredecessor) throws CommunicationException;

	/**
	 * Requests a sign of live. This method is invoked by another node which
	 * thinks it is this node's successor.
	 * 
	 * @throws CommunicationException
	 *             Thrown if an unresolvable communication failure occurs.
	 */
	public abstract void ping() throws CommunicationException;

	/**
	 * Stores the given object under the given ID.
	 * 
	 * @param entryToInsert
	 * @throws CommunicationException
	 *             Thrown if an unresolvable communication failure occurs.
	 */
	public abstract void insertEntry(Entry entryToInsert)
			throws CommunicationException;

	/**
	 * Inserts replicates of the given entries.
	 * 
	 * @param entries
	 *            The entries that are replicated.
	 * @throws CommunicationException
	 *             Thrown if an unresolvable communication failure occurs.
	 * 
	 */
	public abstract void insertReplicas(Set<Entry> entries)
			throws CommunicationException;

	/**
	 * Removes the given object from the list stored under the given ID.
	 * 
	 * @param entryToRemove
	 *            The entry to remove from the dht.
	 * @throws CommunicationException
	 *             Thrown if an unresolvable communication failure occurs.
	 */
	public abstract void removeEntry(Entry entryToRemove)
			throws CommunicationException;

	/**
	 * Removes replicates of the given entries.
	 * 
	 * @param sendingNode
	 *            ID of sending node; if entriesToRemove is empty, all replicas
	 *            with ID smaller than the sending node's ID are removed
	 * @param replicasToRemove
	 *            Replicas to remove; if empty, all replicas with ID smaller
	 *            than the sending node's ID are removed
	 * 
	 * @throws CommunicationException
	 *             Thrown if an unresolvable communication failure occurs.
	 */
	public abstract void removeReplicas(ID sendingNode,
			Set<Entry> replicasToRemove) throws CommunicationException;

	/**
	 * Returns all entries stored under the given ID.
	 * 
	 * @param id
	 * @return A {@link Set} of entries associated with <code>id</code>.
	 * @throws CommunicationException
	 *             Thrown if an unresolvable communication failure occurs.
	 */
	public abstract Set<Entry> retrieveEntries(ID id)
			throws CommunicationException;

	/**
	 * Inform a node that its predecessor leaves the network.
	 * 
	 * @param predecessor
	 * @throws CommunicationException
	 *             Thrown if an unresolvable communication failure occurs.
	 */
	public abstract void leavesNetwork(Node predecessor)
			throws CommunicationException;

	/**
	 * Closes the connection to the node.
	 */
	public abstract void disconnect();

	/**
	 * @param nodeID
	 *            the nodeID to set
	 */
	protected final void setNodeID(ID nodeID) {
		this.nodeID = nodeID;
	}

	/**
	 * @param nodeURL
	 *            the nodeURL to set
	 */
	protected final void setNodeURL(URL nodeURL) {
		this.nodeURL = nodeURL;
	}
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频一区二区不卡| 粉嫩久久99精品久久久久久夜| 国产精品久久久久久福利一牛影视| 精品少妇一区二区三区| 欧美一卡在线观看| 欧美一区二区视频观看视频| 欧美久久免费观看| 欧美丰满美乳xxx高潮www| 91精品久久久久久久91蜜桃| 欧美一区二区三级| 欧美大肚乱孕交hd孕妇| 精品国产网站在线观看| 国产视频不卡一区| 中文字幕一区在线| 亚洲精品高清视频在线观看| 一区二区三区四区不卡在线| 亚洲一区二区三区小说| 午夜精品久久久久久久久| 日本人妖一区二区| 国产美女精品一区二区三区| 国产福利91精品一区| 成人av集中营| 欧美视频完全免费看| 欧美一级一区二区| 久久久精品tv| 亚洲日穴在线视频| 日韩激情视频网站| 国产精品系列在线播放| av亚洲精华国产精华| 在线这里只有精品| 欧美一区二区三区在线电影| 久久综合九色综合97婷婷女人| www国产精品av| 国产精品国产三级国产aⅴ中文| 亚洲欧洲性图库| 日韩和欧美一区二区| 精品一区二区三区欧美| 不卡视频免费播放| 欧美精品久久99久久在免费线| 日韩精品在线网站| 国产69精品久久久久777| 91欧美激情一区二区三区成人| 欧美人狂配大交3d怪物一区| 久久新电视剧免费观看| 亚洲精品国产成人久久av盗摄| 日本视频在线一区| 成人精品小蝌蚪| 777欧美精品| 国产精品久久一级| 三级成人在线视频| 成人激情开心网| 91精品免费在线| 中文字幕在线观看不卡视频| 日韩二区三区四区| 成人福利视频网站| 日韩一区二区三区四区| 国产精品久久毛片| 麻豆视频观看网址久久| a4yy欧美一区二区三区| 日韩三级伦理片妻子的秘密按摩| 中文字幕免费观看一区| 免费成人小视频| 在线视频中文字幕一区二区| 久久久99精品免费观看不卡| 亚洲第一福利一区| 成人黄色小视频| 91麻豆精品国产91久久久久久| 中文字幕亚洲成人| 免费三级欧美电影| 91福利精品视频| 国产喷白浆一区二区三区| 日本午夜一本久久久综合| 91亚洲男人天堂| 国产女人18毛片水真多成人如厕| 日韩精品一级二级 | 在线中文字幕一区| 中文字幕欧美激情一区| 久久国内精品自在自线400部| 色综合久久综合网欧美综合网| 精品国产第一区二区三区观看体验| 亚洲成人三级小说| 99r国产精品| 国产视频一区二区在线| 麻豆精品视频在线观看| 欧美日韩在线三级| 亚洲丝袜美腿综合| 成人激情免费网站| 国产色综合久久| 久久成人av少妇免费| 欧美高清视频www夜色资源网| 亚洲日本电影在线| 懂色av一区二区三区免费观看| 亚洲精品一区二区在线观看| 毛片一区二区三区| 欧美一区二区在线免费播放| 午夜精品一区二区三区电影天堂 | 国产日韩欧美a| 国产一区三区三区| 久久综合色之久久综合| 久久精品国产亚洲aⅴ| 欧美一级欧美三级在线观看| 日韩成人一级片| 欧美一区欧美二区| 天天免费综合色| 欧美精品v国产精品v日韩精品| 午夜不卡av在线| 91精品国产综合久久香蕉的特点| 婷婷久久综合九色国产成人| 欧美日本一区二区三区| 欧美日韩精品免费| 夜夜嗨av一区二区三区网页| 欧美在线啊v一区| 一区二区三区自拍| 91美女片黄在线观看| 亚洲精品综合在线| 欧美日韩国产首页| 久久精品国产网站| 久久久综合网站| www.亚洲人| 亚洲精品va在线观看| 欧美美女直播网站| 麻豆一区二区三| 国产欧美日韩在线观看| 一本色道久久综合亚洲精品按摩| 亚洲永久免费av| 日韩欧美在线1卡| 国产成人免费视频网站高清观看视频 | 日本韩国精品一区二区在线观看| 亚洲综合激情网| 日韩一区二区精品| 国产美女在线精品| 亚洲天堂中文字幕| 精品视频1区2区| 久久99精品久久久久久国产越南 | 欧美日韩亚洲综合| 麻豆传媒一区二区三区| 久久久久久久久久久黄色| 国产·精品毛片| 一区二区三区中文免费| 日韩一级高清毛片| 岛国精品在线观看| 亚洲3atv精品一区二区三区| 欧美α欧美αv大片| 99re这里只有精品首页| 日韩在线a电影| 国产精品色哟哟| 在线不卡一区二区| 国产成人av福利| 亚洲综合男人的天堂| 欧美v国产在线一区二区三区| 成人永久免费视频| 午夜精品久久久久久久蜜桃app| 久久综合五月天婷婷伊人| 色婷婷精品大在线视频| 狠狠色丁香久久婷婷综| 亚洲精品少妇30p| 欧美电影免费观看高清完整版在| 99这里都是精品| 日韩精品一卡二卡三卡四卡无卡| 中文字幕欧美激情| 日韩西西人体444www| 91香蕉视频污| 精品在线播放免费| 亚洲韩国一区二区三区| 国产欧美综合色| 91精品国产品国语在线不卡| 91麻豆文化传媒在线观看| 激情综合亚洲精品| 亚洲第一会所有码转帖| 中文字幕日本不卡| 精品免费日韩av| 欧美日韩一区视频| 91网站最新网址| 国产美女精品人人做人人爽 | 亚洲在线视频网站| 国产欧美日韩视频一区二区| 日韩午夜激情av| 在线国产亚洲欧美| 99re这里都是精品| 国产精品资源站在线| 久久99这里只有精品| 午夜视频一区二区| 一二三区精品福利视频| 中文字幕一区二区在线观看| 久久久久久麻豆| 欧美tickling网站挠脚心| 欧美日韩在线播放三区| 97se亚洲国产综合在线| 国产白丝精品91爽爽久久| 精品影视av免费| 蜜臀久久久99精品久久久久久| 亚洲成va人在线观看| 一区二区三区日韩精品| 亚洲欧美日韩中文字幕一区二区三区| 国产三级精品三级| 国产色产综合色产在线视频 | 日本vs亚洲vs韩国一区三区二区 | 日本中文字幕一区二区视频| 午夜久久久久久| 亚洲综合激情另类小说区|