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

📄 dnsentry.java

📁 很棒的web服务器源代码
💻 JAVA
字号:
// DNSEntry.java// $Id: DNSEntry.java,v 1.3 2000/08/16 21:37:50 ylafon Exp $// (c) COPYRIGHT MIT, INRIA and Keio, 1996-1999.// Please first read the full copyright statement in file COPYRIGHT.htmlpackage org.w3c.tools.log;import java.io.Serializable;/** * This class implements a very small DNS entry, aka a host * the number of time someone tried to resolve it and a resolved flag */public class DNSEntry implements Serializable {    String  host     = null;    boolean resolved = false;    int     tries    = 0;    boolean isResolved() {	return resolved;    }    /**     * when a resolution fails, calling notFound increments the     * number of tries, if ever the number of tries is high enough     * the entry is considered to be numeric forever     */    synchronized void notFound() {	tries++;	if (tries > 4) // enough is enough ;)	    resolved = true;    }    /**     * set the host of this entry, after a successful resolution     */    void setHost(String host) {	// has been resolved	this.host = host;	resolved  = true;    }    public DNSEntry(String host, boolean resolved) {	this.host     = host;	this.resolved = resolved;	this.tries    = 0;    }    public DNSEntry(String host) {        this.host     = host;        this.resolved = true;    }}

⌨️ 快捷键说明

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