亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? adaptiverevisithostqueue.html

?? 網絡爬蟲開源代碼
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
<a name="136" href="#136">136</a>     <em>/**<em>* Logger */</em></em><a name="137" href="#137">137</a>     <strong>private</strong> <strong>static</strong> <strong>final</strong> Logger logger = <a name="138" href="#138">138</a>         Logger.getLogger(AdaptiveRevisitHostQueue.<strong>class</strong>.getName());<a name="139" href="#139">139</a>     <a name="140" href="#140">140</a>     <strong>protected</strong> <a href="../../../../org/archive/crawler/datamodel/CrawlSubstats.html">CrawlSubstats</a> substats = <strong>new</strong> <a href="../../../../org/archive/crawler/datamodel/CrawlSubstats.html">CrawlSubstats</a>(); <a name="141" href="#141">141</a>     <a name="142" href="#142">142</a>     <em class="comment">// Berkeley DB - All class member variables related to BDB JE</em><a name="143" href="#143">143</a>     <em class="comment">// Databases</em><a name="144" href="#144">144</a>     <em>/**<em>* Database containing the URI priority queue, indexed by the the </em></em><a name="145" href="#145">145</a> <em>      * URI string. */</em><a name="146" href="#146">146</a>     <strong>protected</strong> Database primaryUriDB;<a name="147" href="#147">147</a>     <em>/**<em>* Secondary index into {@link #primaryUriDB the primary DB}, URIs indexed</em></em><a name="148" href="#148">148</a> <em>     *  by the time when they can next be processed again. */</em><a name="149" href="#149">149</a>     <strong>protected</strong> SecondaryDatabase secondaryUriDB;<a name="150" href="#150">150</a>     <em>/**<em>* A database containing those URIs that are currently being processed. */</em></em><a name="151" href="#151">151</a>     <strong>protected</strong> Database processingUriDB;<a name="152" href="#152">152</a>     <em class="comment">// Serialization support</em><a name="153" href="#153">153</a>     <em>/**<em>* For BDB serialization of objects */</em></em><a name="154" href="#154">154</a>     <strong>protected</strong> StoredClassCatalog classCatalog;<a name="155" href="#155">155</a>     <em>/**<em>* A binding for the serialization of the primary key (URI string) */</em></em><a name="156" href="#156">156</a>     <strong>protected</strong> EntryBinding primaryKeyBinding;<a name="157" href="#157">157</a>     <em>/**<em>* A binding for the CrawlURIARWrapper object */</em></em><a name="158" href="#158">158</a>     <strong>protected</strong> EntryBinding crawlURIBinding;<a name="159" href="#159">159</a>     <em class="comment">// Cursors into databases</em><a name="160" href="#160">160</a> <a name="161" href="#161">161</a>     <a name="162" href="#162">162</a>     <a name="163" href="#163">163</a>     <em>/**<em>*</em></em><a name="164" href="#164">164</a> <em>     * Constructor</em><a name="165" href="#165">165</a> <em>     * </em><a name="166" href="#166">166</a> <em>     * @param hostName Name of the host this queue represents. This name must</em><a name="167" href="#167">167</a> <em>     *                 be unique for all HQs in the same Environment.</em><a name="168" href="#168">168</a> <em>     * @param env Berkeley DB Environment. All BDB databases created will use </em><a name="169" href="#169">169</a> <em>     *            it.</em><a name="170" href="#170">170</a> <em>     * @param catalog Db for bdb class serialization.</em><a name="171" href="#171">171</a> <em>     * @param valence The total number of simultanous URIs that the HQ can issue</em><a name="172" href="#172">172</a> <em>     *                for processing. Once this many URIs have been issued for</em><a name="173" href="#173">173</a> <em>     *                processing, the HQ will go into {@link #HQSTATE_BUSY busy}</em><a name="174" href="#174">174</a> <em>     *                state until at least one of the URI is </em><a name="175" href="#175">175</a> <em>     *                {@link #update(CrawlURI, boolean, long) updated}.</em><a name="176" href="#176">176</a> <em>     *                Value should be larger then zero. Zero and negative values</em><a name="177" href="#177">177</a> <em>     *                will be treated same as 1.</em><a name="178" href="#178">178</a> <em>     * </em><a name="179" href="#179">179</a> <em>     * @throws IOException if an error occurs opening/creating the </em><a name="180" href="#180">180</a> <em>     *         database</em><a name="181" href="#181">181</a> <em>     */</em><a name="182" href="#182">182</a>     <strong>public</strong> <a href="../../../../org/archive/crawler/frontier/AdaptiveRevisitHostQueue.html">AdaptiveRevisitHostQueue</a>(String hostName, Environment env,<a name="183" href="#183">183</a>             StoredClassCatalog catalog, <strong>int</strong> valence)<a name="184" href="#184">184</a>     throws IOException {<a name="185" href="#185">185</a>         <strong>try</strong>{<a name="186" href="#186">186</a>             <strong>if</strong>(valence &lt; 1) {<a name="187" href="#187">187</a>                 <strong>this</strong>.valence = 1;<a name="188" href="#188">188</a>             } <strong>else</strong> {<a name="189" href="#189">189</a>                 <strong>this</strong>.valence = valence;<a name="190" href="#190">190</a>             }<a name="191" href="#191">191</a>             wakeUpTime = <strong>new</strong> <strong>long</strong>[valence];<a name="192" href="#192">192</a>             <strong>for</strong>(<strong>int</strong> i = 0 ; i &lt; valence ; i++){<a name="193" href="#193">193</a>                 wakeUpTime[i]=0; <em class="comment">// 0 means open slot.</em><a name="194" href="#194">194</a>             }<a name="195" href="#195">195</a>             <a name="196" href="#196">196</a>             inProcessing = 0;<a name="197" href="#197">197</a>             <a name="198" href="#198">198</a>             <strong>this</strong>.hostName = hostName;<a name="199" href="#199">199</a>             <a name="200" href="#200">200</a>             state = HQSTATE_EMPTY; <em class="comment">//HQ is initially empty.</em><a name="201" href="#201">201</a>             nextReadyTime = Long.MAX_VALUE; <em class="comment">//Empty and busy HQ get this value.</em><a name="202" href="#202">202</a>             <a name="203" href="#203">203</a>             <em class="comment">// Set up the primary URI database, it is indexed by URI names </em><a name="204" href="#204">204</a>             DatabaseConfig dbConfig = <strong>new</strong> DatabaseConfig();<a name="205" href="#205">205</a>             dbConfig.setTransactional(false); <a name="206" href="#206">206</a>             dbConfig.setAllowCreate(<strong>true</strong>);<a name="207" href="#207">207</a>             primaryUriDB = env.openDatabase(<strong>null</strong>, hostName, dbConfig);<a name="208" href="#208">208</a>     <a name="209" href="#209">209</a>             <strong>this</strong>.classCatalog = catalog;<a name="210" href="#210">210</a>             <a name="211" href="#211">211</a>             <em class="comment">// Set up a DB for storing URIs being processed</em><a name="212" href="#212">212</a>             DatabaseConfig dbConfig2 = <strong>new</strong> DatabaseConfig();<a name="213" href="#213">213</a>             dbConfig2.setTransactional(false); <a name="214" href="#214">214</a>             dbConfig2.setAllowCreate(<strong>true</strong>);<a name="215" href="#215">215</a>             processingUriDB = env.openDatabase(<strong>null</strong>, <a name="216" href="#216">216</a>                     hostName + <span class="string">"/processing"</span>, dbConfig2);<a name="217" href="#217">217</a>             <a name="218" href="#218">218</a>             <em class="comment">// Create a primitive binding for the primary key (URI string) </em><a name="219" href="#219">219</a>             primaryKeyBinding = TupleBinding.getPrimitiveBinding(String.<strong>class</strong>);<a name="220" href="#220">220</a>             <em class="comment">// Create a serial binding for the CrawlURI object </em><a name="221" href="#221">221</a>             crawlURIBinding = <strong>new</strong> SerialBinding(<strong>class</strong>Catalog, CrawlURI.<strong>class</strong>);<a name="222" href="#222">222</a>     <a name="223" href="#223">223</a>             <em class="comment">// Open a secondary database to allow accessing the primary</em><a name="224" href="#224">224</a>             <em class="comment">// database by the secondary key value.</em><a name="225" href="#225">225</a>             SecondaryConfig secConfig = <strong>new</strong> SecondaryConfig();<a name="226" href="#226">226</a>             secConfig.setAllowCreate(<strong>true</strong>);<a name="227" href="#227">227</a>             secConfig.setSortedDuplicates(<strong>true</strong>);<a name="228" href="#228">228</a>             secConfig.setKeyCreator(<a name="229" href="#229">229</a>                     <strong>new</strong> OrderOfProcessingKeyCreator(<strong>class</strong>Catalog,CrawlURI.<strong>class</strong>));<a name="230" href="#230">230</a>             secondaryUriDB = env.openSecondaryDatabase(<strong>null</strong>, <a name="231" href="#231">231</a>                 hostName+<span class="string">"/timeOfProcessing"</span>, primaryUriDB, secConfig);<a name="232" href="#232">232</a>             <a name="233" href="#233">233</a>             <em class="comment">// Check if we are opening an existing DB...</em><a name="234" href="#234">234</a>             size = countCrawlURIs();<a name="235" href="#235">235</a>             <strong>if</strong> (size > 0) {<a name="236" href="#236">236</a>                 <em class="comment">// If size > 0 then we just opened an existing DB.</em><a name="237" href="#237">237</a>                 <em class="comment">// Set nextReadyTime;</em><a name="238" href="#238">238</a>                 nextReadyTime = peek().getLong(<a name="239" href="#239">239</a>                         A_TIME_OF_NEXT_PROCESSING);<a name="240" href="#240">240</a>                 <em class="comment">// Move any items in processingUriDB into the primariUriDB, ensure</em><a name="241" href="#241">241</a>                 <em class="comment">// that they wind up on top!</em><a name="242" href="#242">242</a>                 flushProcessingURIs();<a name="243" href="#243">243</a>                 state = HQSTATE_READY;<a name="244" href="#244">244</a>             } <a name="245" href="#245">245</a>         } <strong>catch</strong> (DatabaseException e) {<a name="246" href="#246">246</a>             <em class="comment">// Blanket catch all DBExceptions and convert to IOExceptions.</em><a name="247" href="#247">247</a>             IOException e2 = <strong>new</strong> IOException(e.getMessage());<a name="248" href="#248">248</a>             e2.setStackTrace(e.getStackTrace());<a name="249" href="#249">249</a>             <strong>throw</strong> e2; <a name="250" href="#250">250</a>         }<a name="251" href="#251">251</a>     }<a name="252" href="#252">252</a>     <a name="253" href="#253">253</a>     <em>/**<em>*</em></em><a name="254" href="#254">254</a> <em>     * Returns the HQ's name</em><a name="255" href="#255">255</a> <em>     * @return the HQ's name</em><a name="256" href="#256">256</a> <em>     */</em><a name="257" href="#257">257</a>     <strong>public</strong> String getHostName() {<a name="258" href="#258">258</a>         <strong>return</strong> hostName;<a name="259" href="#259">259</a>     }<a name="260" href="#260">260</a>     <a name="261" href="#261">261</a>     <em>/**<em>*</em></em><a name="262" href="#262">262</a> <em>     * Add a CrawlURI to this host queue.</em><a name="263" href="#263">263</a> <em>     * &lt;p></em><a name="264" href="#264">264</a> <em>     * Calls can optionally chose to have the time of next processing value </em><a name="265" href="#265">265</a> <em>     * override existing values for the URI if the existing values are 'later'</em><a name="266" href="#266">266</a> <em>     * then the new ones. </em><a name="267" href="#267">267</a> <em>     * </em><a name="268" href="#268">268</a> <em>     * @param curi The CrawlURI to add.</em><a name="269" href="#269">269</a> <em>     * @param overrideSetTimeOnDups If true then the time of next processing for</em><a name="270" href="#270">270</a> <em>     *                           the supplied URI will override the any</em><a name="271" href="#271">271</a> <em>     *                           existing time for it already stored in the HQ.</em><a name="272" href="#272">272</a> <em>     *                           If false, then no changes will be made to any</em><a name="273" href="#273">273</a> <em>     *                           existing values of the URI. Note: Will never</em><a name="274" href="#274">274</a> <em>     *                           override with a later time.</em><a name="275" href="#275">275</a> <em>     * @throws IOException When an error occurs accessing the database</em><a name="276" href="#276">276</a> <em>     */</em><a name="277" href="#277">277</a>     <strong>public</strong> <strong>void</strong> add(<a href="../../../../org/archive/crawler/datamodel/CrawlURI.html">CrawlURI</a> curi, <strong>boolean</strong> overrideSetTimeOnDups) <a name="278" href="#278">278</a>             throws IOException{<a name="279" href="#279">279</a>         <strong>if</strong>(logger.isLoggable(Level.FINER)){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品国产第一综合99久久| 精品国产乱码久久| 丁香六月综合激情| 久久精品免费观看| 日本免费新一区视频| 亚洲午夜av在线| 亚洲一区二区三区精品在线| 亚洲a一区二区| 亚洲午夜精品在线| 日韩和欧美一区二区三区| 亚洲电影激情视频网站| 亚洲成av人在线观看| 日韩av网站免费在线| 精品一区二区三区香蕉蜜桃 | 精彩视频一区二区| 国产一区999| 粉嫩久久99精品久久久久久夜| 国产精品一区一区| 99热这里都是精品| 在线观看区一区二| 欧美一区二区久久久| 久久精品亚洲乱码伦伦中文| 欧美激情在线看| 亚洲精品高清在线观看| 亚洲超碰精品一区二区| 青娱乐精品在线视频| 成人美女在线观看| 91视频在线观看| 欧美xxxxxxxxx| |精品福利一区二区三区| 一区二区三区四区亚洲| 青青草97国产精品免费观看| 国产精品1区2区3区| 色偷偷久久人人79超碰人人澡| 91.麻豆视频| 精品国产乱码久久久久久1区2区| 亚洲视频在线观看一区| 美女任你摸久久| 99精品热视频| 日韩欧美亚洲国产精品字幕久久久| 久久久久久久久久看片| 亚洲电影一级黄| 成人永久免费视频| 欧美一级片在线| 亚洲人xxxx| 国产精品一区二区在线观看网站 | 欧美老女人在线| 国产精品久久久一本精品| 日韩在线观看一区二区| 97精品久久久午夜一区二区三区| 日韩亚洲欧美在线观看| 一区二区高清在线| 国产91精品精华液一区二区三区 | 久久久亚洲综合| 亚洲国产日韩a在线播放| 国产乱一区二区| 91精品国产色综合久久不卡蜜臀| 国产女主播一区| 久久精品国产精品亚洲综合| 91久久奴性调教| 国产精品嫩草99a| 国产精品综合一区二区| 日韩欧美资源站| 肉色丝袜一区二区| 91搞黄在线观看| 亚洲私人影院在线观看| 成人黄色电影在线| 国产日韩精品一区二区三区| 精品一区二区三区久久| 91精品国产色综合久久| 五月婷婷色综合| 欧美群妇大交群中文字幕| 亚洲一区在线视频观看| 在线观看亚洲一区| 亚洲卡通欧美制服中文| 97久久超碰国产精品| 亚洲精品videosex极品| 91国产成人在线| 亚洲国产一区在线观看| 欧美视频日韩视频在线观看| 亚洲国产日日夜夜| 欧美婷婷六月丁香综合色| 亚洲国产成人av好男人在线观看| 欧美视频一区在线| 日韩二区在线观看| 日韩一区二区三区在线| 久久99国产精品尤物| 精品精品欲导航| 风间由美中文字幕在线看视频国产欧美| 337p粉嫩大胆色噜噜噜噜亚洲| 久久国产精品72免费观看| 亚洲精品在线电影| k8久久久一区二区三区| 亚洲综合成人在线| 欧美日韩精品三区| 韩国理伦片一区二区三区在线播放| 日韩欧美黄色影院| 成人app软件下载大全免费| 亚洲精品视频在线观看网站| 欧美色中文字幕| 国产专区欧美精品| 亚洲欧美成人一区二区三区| 欧美日韩国产综合一区二区| 韩国欧美一区二区| 亚洲人成网站色在线观看| 欧美丰满少妇xxxxx高潮对白 | 一区二区中文字幕在线| 在线亚洲高清视频| 经典三级一区二区| 亚洲自拍偷拍欧美| 精品国内二区三区| 色国产精品一区在线观看| 图片区小说区区亚洲影院| 国产亚洲综合av| 欧美在线观看一二区| 美腿丝袜亚洲色图| 亚洲欧美电影一区二区| 久久综合狠狠综合久久综合88 | 久久久亚洲欧洲日产国码αv| 成人的网站免费观看| 日本美女视频一区二区| 国产精品久久久久久久久动漫| 在线观看免费亚洲| 国产**成人网毛片九色| 日本一不卡视频| 国产精品麻豆99久久久久久| 666欧美在线视频| 色哟哟日韩精品| 国产精品一区在线观看你懂的| 偷窥少妇高潮呻吟av久久免费| 国产精品美女久久久久久久| 欧美不卡一区二区三区| 欧美三级韩国三级日本一级| 99久久精品免费看| 精品在线视频一区| 亚洲高清在线视频| 国产精品福利影院| 久久日一线二线三线suv| 欧美精品一卡二卡| 99精品热视频| gogogo免费视频观看亚洲一| 久久精品久久99精品久久| 五月激情综合网| 一区在线播放视频| 国产精品久久久久婷婷| 国产清纯白嫩初高生在线观看91| 4438x亚洲最大成人网| 欧美日韩久久一区二区| 欧美日韩日本视频| 欧美三级视频在线| 欧美日韩美女一区二区| 欧美在线视频日韩| 欧美日韩国产美女| 欧美性受xxxx| 欧美日韩卡一卡二| 欧美嫩在线观看| 777欧美精品| 欧美精品亚洲二区| 欧美在线高清视频| 欧美亚洲国产一区在线观看网站 | 国产精品国产馆在线真实露脸| 精品捆绑美女sm三区| 久久久久久麻豆| 国产亚洲欧美色| 亚洲欧美一区二区三区极速播放| 国产精品欧美久久久久一区二区| 国产亚洲精品中文字幕| 国产精品国产三级国产三级人妇 | 久久色视频免费观看| 国产婷婷一区二区| 亚洲色大成网站www久久九九| 专区另类欧美日韩| 午夜电影一区二区| 国产米奇在线777精品观看| 国产成人av电影在线| 在线观看亚洲成人| 欧美一级二级三级蜜桃| 国产蜜臀av在线一区二区三区| 中文字幕亚洲一区二区va在线| 一区二区三区欧美在线观看| 日韩av一级电影| 成人永久看片免费视频天堂| 欧美日韩中文字幕一区二区| 日韩欧美区一区二| 亚洲色图都市小说| 久久99精品久久久| 91香蕉视频mp4| 欧美一级片在线看| 国产精品家庭影院| 久久99热99| 色88888久久久久久影院野外| 欧美日韩国产bt| 中文字幕在线不卡| 秋霞成人午夜伦在线观看| 国产激情视频一区二区在线观看| 日本道精品一区二区三区| 久久精品视频在线看| 亚洲一区二区在线免费观看视频| 美洲天堂一区二卡三卡四卡视频| 91丨porny丨户外露出|