/[projects]/android/MarketStats/src/dk/thoerup/marketstats/ShowStats.java
ViewVC logotype

Diff of /android/MarketStats/src/dk/thoerup/marketstats/ShowStats.java

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

revision 663 by torben, Fri Apr 23 15:23:44 2010 UTC revision 666 by torben, Fri Apr 23 15:28:34 2010 UTC
# Line 6  import java.net.InetSocketAddress; Line 6  import java.net.InetSocketAddress;
6  import java.util.ArrayList;  import java.util.ArrayList;
7  import java.util.Collections;  import java.util.Collections;
8  import java.util.Date;  import java.util.Date;
 import java.util.Formatter;  
9  import java.util.Locale;  import java.util.Locale;
10  import java.util.logging.Logger;  import java.util.logging.Logger;
11    
# Line 18  import javax.servlet.http.HttpServletRes Line 17  import javax.servlet.http.HttpServletRes
17  import net.spy.memcached.MemcachedClient;  import net.spy.memcached.MemcachedClient;
18    
19  import com.gc.android.market.api.MarketSession;  import com.gc.android.market.api.MarketSession;
 import com.gc.android.market.api.MarketSession.Callback;  
 import com.gc.android.market.api.model.Market.App;  
20  import com.gc.android.market.api.model.Market.AppsRequest;  import com.gc.android.market.api.model.Market.AppsRequest;
 import com.gc.android.market.api.model.Market.AppsResponse;  
21  import com.gc.android.market.api.model.Market.CommentsRequest;  import com.gc.android.market.api.model.Market.CommentsRequest;
22  import com.gc.android.market.api.model.Market.ResponseContext;  
23    
24    
25  public class ShowStats extends HttpServlet {  public class ShowStats extends HttpServlet {
# Line 75  public class ShowStats extends HttpServl Line 71  public class ShowStats extends HttpServl
71                          if (start > 0)                                                    if (start > 0)                          
72                                  count = Math.min(10, commentsCb.getEntryCount() );                                  count = Math.min(10, commentsCb.getEntryCount() );
73                                                    
74                          log.warning("count=" + count + " start=" + start + " " + locale);                          //log.warning("count=" + count + " start=" + start + " " + locale);
75                          CommentsRequest commentsRequest = CommentsRequest.newBuilder()                          CommentsRequest commentsRequest = CommentsRequest.newBuilder()
76                          .setAppId(appId)                          .setAppId(appId)
77                          .setStartIndex(start)                          .setStartIndex(start)
# Line 86  public class ShowStats extends HttpServl Line 82  public class ShowStats extends HttpServl
82                          session.flush();                          session.flush();
83                          start +=10;                          start +=10;
84                                                    
85                          if (start >= 30)                          if (start >= 20)
86                                  break; //emergency brake                                  break; //emergency brake
87                                                    
88                  } while ( start < commentsCb.getEntryCount() );                  } while ( start < commentsCb.getEntryCount() );

Legend:
Removed from v.663  
changed lines
  Added in v.666

  ViewVC Help
Powered by ViewVC 1.1.20