Annotation of java/classes/org/w3c/tools/log/DNSEntry.java, revision 1.1
1.1 ! ylafon 1: // DNSEntry.java
! 2: // $Id$
! 3: // (c) COPYRIGHT MIT, INRIA and Keio, 1996-1999.
! 4: // Please first read the full copyright statement in file COPYRIGHT.html
! 5:
! 6: package org.w3c.tools.log;
! 7:
! 8: import java.lang.*;
! 9: import java.io.*;
! 10:
! 11: public class DNSEntry implements Serializable {
! 12: String host = null;
! 13: boolean resolved = false;
! 14: int tries = 0;
! 15:
! 16: boolean isResolved() {
! 17: return resolved;
! 18: }
! 19:
! 20: synchronized void notFound() {
! 21: tries++;
! 22: if (tries > 4) // enough is enough ;)
! 23: resolved = true;
! 24: }
! 25:
! 26: void setHost(String host) {
! 27: // has been resolved
! 28: this.host = host;
! 29: resolved = true;
! 30: }
! 31:
! 32: public DNSEntry(String host, boolean resolved) {
! 33: this.host = host;
! 34: this.resolved = resolved;
! 35: this.tries = 0;
! 36: }
! 37:
! 38: public DNSEntry(String host) {
! 39: this.host = host;
! 40: this.resolved = true;
! 41: }
! 42: }
! 43:
Webmaster