コード例 #1
0
 @Override
 public void Cmd_run() {
   Init_bldr_bmks();
   this.time_bgn = System_.Ticks();
   int total_pending = Xob_xfer_regy_tbl.Select_total_pending(bldr_conn);
   // if (total_pending > 250000 && src_bin_mgr__fsdb_version == null)
   usr_dlg.Note_many("", "", "total pending: ~{0}", total_pending);
   List_adp list = List_adp_.New();
   boolean loop = true;
   while (loop) {
     byte rslt = Select_fsdb_itms(list);
     switch (rslt) {
       case Select_rv_stop:
         if (bin_db_mgr.Tier_id_is_last(tier_id_val)) loop = false;
         else {
           ++tier_id_val;
           page_id_val = 0;
           continue;
         }
         break;
       case Select_rv_next_page:
         ++page_id_val;
         lnki_id_val = 0;
         continue;
       case Select_rv_process:
         break;
     }
     if (!loop) break; // no more ttls found
     int len = list.Count();
     usr_dlg.Prog_many("", "", "fetched pages: ~{0}", len);
     for (int i = 0; i < len; ++i) {
       Xodb_tbl_oimg_xfer_itm fsdb = (Xodb_tbl_oimg_xfer_itm) list.Get_at(i);
       Download_itm(fsdb);
       if (exit_now
           || exec_count >= exec_count_max
           || exec_fail >= exec_fail_max
           || page_id_val >= page_id_end) {
         this.Txn_sav();
         return;
       }
     }
   }
   exec_done = true;
 }
コード例 #2
0
ファイル: Pf_func_.java プロジェクト: gnosygnu/xowa_android
 public static int[] Ary_get(Xow_domain_itm domain_itm, boolean wmf) {
   if (wmf && domain_itm != null && domain_itm.Domain_type().Tid() != Xow_domain_tid_.Tid__home)
     return Ary_wmf;
   if (Ary_nonwmf == null) {
     List_adp list = List_adp_.New();
     int len = Ary_wmf.length;
     for (int i = 0; i < len; ++i) {
       list.Add(Ary_wmf[i]);
     }
     list.Add_many(
         Xol_kwd_grp_.Id_strx_len,
         Xol_kwd_grp_.Id_strx_pos,
         Xol_kwd_grp_.Id_strx_rpos,
         Xol_kwd_grp_.Id_strx_sub,
         Xol_kwd_grp_.Id_strx_count,
         Xol_kwd_grp_.Id_strx_replace,
         Xol_kwd_grp_.Id_strx_explode,
         Xol_kwd_grp_.Id_strx_urldecode,
         Xol_kwd_grp_.Id_new_window_link);
     Ary_nonwmf = (int[]) list.To_ary_and_clear(int.class);
   }
   return Ary_nonwmf;
 }