6 |
import java.util.logging.Logger; |
import java.util.logging.Logger; |
7 |
|
|
8 |
public class LookupWorker implements Runnable { |
public class LookupWorker implements Runnable { |
9 |
class LookupResult { |
static class LookupResult { |
10 |
double bedsteAfstand = 9999999.999; |
double bedsteAfstand = 9999999.999; |
11 |
Adresse bedsteAdr = null; |
Adresse bedsteAdr = null; |
12 |
} |
} |
54 |
|
|
55 |
if (result.bedsteAfstand <= consts.getMaxDistance() ) { //Gem kun hvis distancen er under max_distance for distributøren |
if (result.bedsteAfstand <= consts.getMaxDistance() ) { //Gem kun hvis distancen er under max_distance for distributøren |
56 |
if (LookupMain.verbose == true) { |
if (LookupMain.verbose == true) { |
57 |
logger.info("(" +workerId + ") Bedste: " + qAdresse + "==>" + result.bedsteAdr + " ::: " + result.bedsteAfstand ); |
logger.fine("(" +workerId + ") Bedste: " + qAdresse + "==>" + result.bedsteAdr + " ::: " + result.bedsteAfstand ); |
58 |
} |
} |
59 |
|
|
60 |
try { |
try { |
66 |
System.exit(0); //hvis at indsættelsen fejler skal vi afbryde med det samme |
System.exit(0); //hvis at indsættelsen fejler skal vi afbryde med det samme |
67 |
} |
} |
68 |
} else { |
} else { |
69 |
logger.info("(" +workerId + ") For stor afstand " + qAdresse + " -> " + result.bedsteAfstand); |
logger.fine("(" +workerId + ") For stor afstand " + qAdresse + " -> " + result.bedsteAfstand); |
70 |
} |
} |
71 |
} else { |
} else { |
72 |
logger.warning("(" +workerId + ") Ingen match til " + qAdresse); |
logger.warning("(" +workerId + ") Ingen match til " + qAdresse); |