/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/InputWorker.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/InputWorker.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2148 by torben, Wed Apr 30 12:53:01 2014 UTC revision 2149 by torben, Wed Apr 30 14:18:43 2014 UTC
# Line 15  public class InputWorker implements Runn Line 15  public class InputWorker implements Runn
15          public Queue<WorkSet> queue = new ConcurrentLinkedQueue<WorkSet>();          public Queue<WorkSet> queue = new ConcurrentLinkedQueue<WorkSet>();
16          public boolean isDone = false;          public boolean isDone = false;
17                    
18            public int largestWorkSetCount = 0;
19            public int largestWorkSetPostnr= 0;
20            
21                    
22          public InputWorker(Database db) {          public InputWorker(Database db) {
23                  this.db = db;                  this.db = db;
# Line 57  public class InputWorker implements Runn Line 60  public class InputWorker implements Runn
60                                                                                                                                                                    
61                                          workSet.queueSize = workSet.ikkeDaekkede.size();                                          workSet.queueSize = workSet.ikkeDaekkede.size();
62                                                                                    
63                                            saveLargeWorkset( workSet );
64                                          queue.add(workSet);                                          queue.add(workSet);
65                                  } else {                                  } else {
66                                          //queue.wait(10);                                          //queue.wait(10);
# Line 72  public class InputWorker implements Runn Line 76  public class InputWorker implements Runn
76                          logger.log(Level.SEVERE, "Error during inputworker", e);                          logger.log(Level.SEVERE, "Error during inputworker", e);
77                          System.exit(1);                          System.exit(1);
78                  }                  }
79            }
80            
81            private void saveLargeWorkset( WorkSet ws) {
82                    int newSize = ws.daekkedeAdresser.size();
83                                    
84                    if (newSize > largestWorkSetCount) {
85                            largestWorkSetCount = newSize;
86                            largestWorkSetPostnr = ws.postnr;
87                    }
88          }          }
89    
90  }  }

Legend:
Removed from v.2148  
changed lines
  Added in v.2149

  ViewVC Help
Powered by ViewVC 1.1.20