/[projects]/dao/DaoAdresseService/src/dk/daoas/daoadresseservice/db/LogPersistance.java
ViewVC logotype

Diff of /dao/DaoAdresseService/src/dk/daoas/daoadresseservice/db/LogPersistance.java

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

revision 2374 by torben, Tue Feb 24 14:48:30 2015 UTC revision 2375 by torben, Wed Feb 25 09:52:34 2015 UTC
# Line 1  Line 1 
1  package dk.daoas.daoadresseservice.db;  package dk.daoas.daoadresseservice.db;
2    
3  import java.sql.SQLException;  import java.sql.SQLException;
4  import java.util.concurrent.Executor;  import java.util.concurrent.ExecutorService;
5  import java.util.concurrent.Executors;  import java.util.concurrent.Executors;
6    
7  import dk.daoas.daoadresseservice.beans.SearchResult;  import dk.daoas.daoadresseservice.beans.SearchResult;
8    
9  public class LogPersistance {  public class LogPersistance  {
10                    
11          Executor threadPool = Executors.newFixedThreadPool(1);          ExecutorService threadPool = Executors.newFixedThreadPool(1);
12                    
13          static class LogPersistanceWorker implements Runnable {          static class LogPersistanceWorker implements Runnable {
14                  String brugerid;                  String brugerid;
# Line 36  public class LogPersistance { Line 36  public class LogPersistance {
36          public void saveRequestLog(String brugerid, String postnr, String adresse, SearchResult result) {          public void saveRequestLog(String brugerid, String postnr, String adresse, SearchResult result) {
37                  threadPool.execute( new LogPersistanceWorker(brugerid,postnr,adresse,result) );                  threadPool.execute( new LogPersistanceWorker(brugerid,postnr,adresse,result) );
38          }          }
39    
40    
41            public void shutdown() {
42                    threadPool.shutdown();          
43            }
44  }  }

Legend:
Removed from v.2374  
changed lines
  Added in v.2375

  ViewVC Help
Powered by ViewVC 1.1.20