chiark / gitweb /
delete stuff about commod table cache
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Sep 2010 12:05:31 +0000 (13:05 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Sep 2010 12:05:31 +0000 (13:05 +0100)
src/com/tedpearson/ypp/market/MarketUploader.java

index f105f1aaa0e21e7d990bf782c2d2cb2e19f3a114..b3fa49fdb99ed99dc0eb60974d88bc4f18fd380d 100644 (file)
@@ -438,7 +438,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                        return;
                }
 
                        return;
                }
 
-               progresslog("getisland...");
+               progresslog("(async) getisland...");
                getIsland();
                progresslog("getocean...");
                getOcean();
                getIsland();
                progresslog("getocean...");
                getOcean();
@@ -447,6 +447,7 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                if (latch != null) {
                    latch.await(2, java.util.concurrent.TimeUnit.SECONDS);
                }
                if (latch != null) {
                    latch.await(2, java.util.concurrent.TimeUnit.SECONDS);
                }
+               progresslog("(async) getisland done");
 
                if (islandName == null) {
                    error("Could not find island name in YPP user interface.");
 
                if (islandName == null) {
                    error("Could not find island name in YPP user interface.");
@@ -533,10 +534,12 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                    }
                    // get commod map
                
                    }
                    // get commod map
                
+                   progresslog("pctb commodmap...");
                    HashMap<String,Integer> commodMap = getCommodMap();
                    if(commodMap == null) {
                        return;
                    }
                    HashMap<String,Integer> commodMap = getCommodMap();
                    if(commodMap == null) {
                        return;
                    }
+                   progresslog("pctb commodmap done.");
                    int[] offerCount = getBuySellMaps(data,buys,sells,stallMap,commodMap);
                    //println(buys.toString());
                    // if (dtxt!=null) dtxt.println(sells);
                    int[] offerCount = getBuySellMaps(data,buys,sells,stallMap,commodMap);
                    //println(buys.toString());
                    // if (dtxt!=null) dtxt.println(sells);
@@ -695,13 +698,6 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
        
        /**
        *       Gets the list of commodities and their associated commodity ids.
        
        /**
        *       Gets the list of commodities and their associated commodity ids.
-       *       On the first run, the data is downloaded from the PCTB server. 
-       *       After the first run, the data is cached using <code>Preferences</code>.
-       *       <p>
-       *       Potential issues: When more commodities are added to the server, this
-       *       program will currently break unless the user deletes the preferences
-       *       file or we give them a new release with a slighly different storage
-       *       location for the data.
        *
        *       @return a map where the key is the commodity and the value is the commodity id.
        */
        *
        *       @return a map where the key is the commodity and the value is the commodity id.
        */
@@ -710,7 +706,6 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                        return commodMap;
                }
                HashMap<String,Integer> map = new HashMap<String,Integer>();
                        return commodMap;
                }
                HashMap<String,Integer> map = new HashMap<String,Integer>();
-               Preferences prefs = Preferences.userNodeForPackage(getClass());
                String xml;
                try {
                        URL host = new URL(PCTB_HOST_URL + "commodmap.php");
                String xml;
                try {
                        URL host = new URL(PCTB_HOST_URL + "commodmap.php");