Package fr.eolya.utils.nosql.mongodb

Examples of fr.eolya.utils.nosql.mongodb.MongoDBCollection.update()


        doc2.put("crawl_nexttime", new Date());
        doc2.put("crawl_process_status", ISource.CRAWL_PROCESS_MODE_NONE);
        doc2.put("crawl_priority", "2");
        doc2.put("running_crawl_lastupdate", null);
        doc2.put("_poped", false);
        coll.update(doc, doc2);         
      }
    }
  }

  public boolean updateSourceStatusStartup(int id, long queueSize, long doneQueueSize) {
View Full Code Here


      doc2.put("crawl_lasttime_start", new Date());         
      doc2.put("running_crawl_lastupdate", new Date());  
      doc2.put("crawl_process_status", ISource.CRAWL_PROCESS_STATUS_CRAWLING);
      doc2.put("crawl_mode", ISource.CRAWL_PROCESS_MODE_NONE);
      doc2.put("_poped", false);
      coll.update(doc, doc2);       
    }
    return true;
  }

  public boolean updateSourceProcessingInfo(int id, long queueSize, long doneQueueSize, String processingInfo) {
View Full Code Here

      BasicDBObject doc2 = (BasicDBObject) doc.copy();
      doc2.put("running_crawl_item_processed", doneQueueSize);
      doc2.put("running_crawl_item_to_process", queueSize);
      doc2.put("running_crawl_lastupdate", new Date());  
      doc2.put("processing_info", processingInfo);  
      coll.update(doc, doc2);       
    }
    return true;
  }

  private long getSourcePageCount(int id) {
View Full Code Here

      if (src.getExtra()!=null && src.getExtra().asXml()!=null)
        doc2.put("extra", src.getExtra().asXml().replaceAll("'", "''"));
      else
        doc2.put("extra", "");

      coll.update(doc, doc2);   
     
      updateSourceLog(src, 0);
    }
    return true;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.