From: <jes...@us...> - 2011-01-10 20:20:53
|
Revision: 7111 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=7111&view=rev Author: jesseeichar Date: 2011-01-10 20:20:47 +0000 (Mon, 10 Jan 2011) Log Message: ----------- rename of timeout to something more descriptive Modified Paths: -------------- sandbox/geocat.ch/trunk/jeeves/src/jeeves/xlink/Processor.java Modified: sandbox/geocat.ch/trunk/jeeves/src/jeeves/xlink/Processor.java =================================================================== --- sandbox/geocat.ch/trunk/jeeves/src/jeeves/xlink/Processor.java 2011-01-10 20:19:50 UTC (rev 7110) +++ sandbox/geocat.ch/trunk/jeeves/src/jeeves/xlink/Processor.java 2011-01-10 20:20:47 UTC (rev 7111) @@ -3,7 +3,6 @@ import java.io.*; import java.net.HttpURLConnection; import java.net.URL; -import java.net.URLConnection; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -33,17 +32,17 @@ private static class Failure implements Comparable<Failure> { public final String uri; public final Throwable t; - public final long timeout; + public final long timeOfFailure; - Failure(String uri, Throwable t, long timeout) { + Failure(String uri, Throwable t, long timeOfFailure) { this.uri = uri; this.t = t; - this.timeout = timeout; + this.timeOfFailure = timeOfFailure; } @Override public int compareTo(Failure o) { - long diff = timeout - o.timeout; + long diff = timeOfFailure - o.timeOfFailure; if(diff == 0) { return 0; } else { @@ -58,7 +57,7 @@ Failure failure = (Failure) o; - if (timeout != failure.timeout) return false; + if (timeOfFailure != failure.timeOfFailure) return false; if (uri != null ? !uri.equals(failure.uri) : failure.uri != null) return false; return true; @@ -67,7 +66,7 @@ @Override public int hashCode() { int result = uri != null ? uri.hashCode() : 0; - result = 31 * result + (int) (timeout ^ (timeout >>> 32)); + result = 31 * result + (int) (timeOfFailure ^ (timeOfFailure >>> 32)); return result; } } @@ -136,7 +135,7 @@ * Recursively navigate in XML children and search for XLink. Load and cache * remote resource if needed. * <p/> - * TODO : Maybe don't wait to much to load a remote resource. Add timeout + * TODO : Maybe don't wait to much to load a remote resource. Add timeOfFailure * param? * * @param action @@ -306,7 +305,7 @@ for (Iterator<Failure> iter = failures.iterator(); iter.hasNext();) { Failure next = iter.next(); - if( now - next.timeout > ELAPSE_TIME ){ + if( now - next.timeOfFailure > ELAPSE_TIME ){ iter.remove(); } else { break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |