-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from forcedotcom/add-crawl-bean
Added a Bean for the progress, easier to consume by other applications
- Loading branch information
Showing
2 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/com/salesforce/webdev/sitecrawler/beans/CrawlProgress.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.salesforce.webdev.sitecrawler.beans; | ||
|
||
/** | ||
* <p>Simple bean to collect the progress of a crawl.</p> | ||
* | ||
* @author jroel | ||
* | ||
*/ | ||
public class CrawlProgress { | ||
/** | ||
* <p>Total pages crawled.</p> | ||
*/ | ||
public long crawled; | ||
/** | ||
* <p>Number of pages left to crawl.</p> | ||
*/ | ||
public long leftToCrawl; | ||
/** | ||
* <p>Number of pages currently in the queue, waiting to be downloaded.</p> | ||
*/ | ||
public long scheduledForDownload; | ||
/** | ||
* <p>Number of pages currently in the queue (already downloaded), waiting to be processed.</p> | ||
*/ | ||
public long scheduledForProcessing; | ||
/** | ||
* <p>Number of pages completely processed.</p> | ||
*/ | ||
public long fullyProcessed; | ||
/** | ||
* <p>Percentage of crawl complete (estimated).</p> | ||
*/ | ||
public double complete; | ||
} |