OSDN Git Service

1回で取得できるツイートの数を200件まで引き上げた
authorspark_xp <spark_xp@d8c9ecd3-d47d-4367-8645-de82c00e513f>
Sun, 26 Jun 2011 15:53:50 +0000 (15:53 +0000)
committerspark_xp <spark_xp@d8c9ecd3-d47d-4367-8645-de82c00e513f>
Sun, 26 Jun 2011 15:53:50 +0000 (15:53 +0000)
git-svn-id: http://svn.sourceforge.jp/svnroot/nt-manager/NishioTweetManager/trunk@150 d8c9ecd3-d47d-4367-8645-de82c00e513f

src/twitter/gui/component/TweetTabbedTable.java
src/twitter/log/TwitterLogManager.java
src/twitter/manage/TweetManager.java

index 72cbe1c..81785a9 100644 (file)
@@ -59,7 +59,8 @@ public class TweetTabbedTable {
        // 新しく取得した部分のテーブルの色
        private Color newTableColor = null;
        // テーブルに追加できる要素の最大数
-       private int tableElementMaxSize = 200;
+       //TODO: ここを変更できるようにする
+       private int tableElementMaxSize = 500;
        // 自動更新に使うタイマーのID
        private String timerID;
 
index 66157d9..6d3145e 100644 (file)
@@ -150,10 +150,13 @@ public class TwitterLogManager {
                try {
                        dao.connectDB();
                        dao.createTable();
+                       long time = System.currentTimeMillis();
                        for(Status s : statuses ) {
                                TweetDBObject o = StatusDBObjectConverter.convertStatusToDBObject(s, true);
                                dao.insert( o );
                        }
+                       time = System.currentTimeMillis() - time;
+                       System.out.println("DB INSERT TIME:" + time);
                        dao.closeDB();
                }catch(Exception e) {
                        e.printStackTrace();
index a86685b..f23437a 100644 (file)
@@ -206,7 +206,7 @@ public class TweetManager {
        // アカウント情報保存ファイル名
        private static final String ACCOUNT_INFORMATION_FILENAME = TweetConfiguration.ACCOUNT_INFORMATION_FILENAME;
        // 一度に取得する最大のtweet数
-       private final int MAX_TWEET_NUM = 99;
+       private final int MAX_TWEET_NUM = 200;
        // 前回取得したtweetの情報
        private long sinceTweetID = 0;
        // 前回取得したmentionのtweetID
@@ -1079,13 +1079,13 @@ public class TweetManager {
                AccessToken ac = new AccessToken(accessToken, secretToken);
                twitter.setOAuthAccessToken(ac);
                // 設定ファイルを読み込む
-               try {
+               /*try {
                        loadProperties();
                } catch (FileNotFoundException e) {
                        e.printStackTrace();
                } catch (IOException e) {
                        e.printStackTrace();
-               }
+               }*/
        }
 
        /**