|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbass.crawler.PageDistributon
public class PageDistributon
Basic class for iterating from 0 to a max number on a centralized place
| Field Summary | |
|---|---|
private int |
arrayIndex
|
private int |
current
|
protected int |
pageCount
|
private boolean[] |
pageStatus
|
private long |
startTime
|
private long |
waitTime
|
| Constructor Summary | |
|---|---|
PageDistributon()
|
|
PageDistributon(int maxCount)
|
|
| Method Summary | |
|---|---|
int |
getCurrent()
|
int |
getPage()
returns current page count & increases count |
int |
getPageCount()
|
void |
setPageCount(int maxCount)
sets the maximum value returned |
void |
setStatus(int pageNumber,
boolean pageStatus)
Using a boolean array to save the pages we already crawled and the ones with errors to check them later again |
void |
writeMissingPages(java.lang.String country)
writes the missing pages to a text file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int pageCount
private int current
private int arrayIndex
private boolean[] pageStatus
private long startTime
private long waitTime
| Constructor Detail |
|---|
public PageDistributon(int maxCount)
public PageDistributon()
| Method Detail |
|---|
public void setPageCount(int maxCount)
count - in our case the max page numberpublic int getPage()
public void writeMissingPages(java.lang.String country)
country - current country (will be included in filename)
filename = missing_pages_
public void setStatus(int pageNumber,
boolean pageStatus)
pageNumber - pageStatus - public int getCurrent()
public int getPageCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||