|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.nutch.db.Page
A row in the Page Database.
type name description --------------------------------------------------------------- byte VERSION - A byte indicating the version of this entry. String URL - The url of a page. This is the primary key. 128bit ID - The MD5 hash of the contents of the page. 64bit DATE - The date this page should be refetched. byte RETRIES - The number of times we've failed to fetch this page. byte INTERVAL - Frequency, in days, this page should be refreshed. float SCORE - Multiplied into the score for hits on this page. float NEXTSCORE - Multiplied into the score for hits on this page.
Nested Class Summary | |
static class |
Page.Comparator
Compares pages by MD5, then by URL. |
static class |
Page.UrlComparator
Compares pages by URL only. |
Constructor Summary | |
Page()
Construct a page ready to be read by readFields(DataInput) . |
|
Page(String urlString,
float score)
|
|
Page(String urlString,
float score,
float nextScore,
long nextFetch)
|
|
Page(String urlString,
float score,
long nextFetch)
|
|
Page(String urlString,
MD5Hash md5)
Construct a new, default page, due to be fetched. |
Method Summary | |
Object |
clone()
|
int |
compareTo(Object o)
Compare to another Page object |
long |
computeDomainID()
Compute domain ID from URL |
boolean |
equals(Object o)
|
byte |
getFetchInterval()
|
MD5Hash |
getMD5()
|
long |
getNextFetchTime()
|
float |
getNextScore()
|
int |
getNumOutlinks()
|
byte |
getRetriesSinceFetch()
|
float |
getScore()
|
UTF8 |
getURL()
|
int |
hashCode()
|
static Page |
read(DataInput in)
|
void |
readFields(DataInput in)
Reads the fields of this object from in . |
void |
set(Page that)
Copy the contents of another instance into this instance. |
void |
setFetchInterval(byte fetchInterval)
|
void |
setMD5(MD5Hash md5)
|
void |
setNextFetchTime(long nextFetch)
|
void |
setNumOutlinks(int numOutlinks)
|
void |
setRetriesSinceFetch(int retries)
|
void |
setScore(float score)
|
void |
setScore(float score,
float nextScore)
|
void |
setURL(String url)
|
String |
toString()
Print out the Page |
String |
toTabbedString()
A tab-delimited text version of the Page's data. |
void |
write(DataOutput out)
Write the bytes out to the bytestream |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Page()
readFields(DataInput)
.
public Page(String urlString, MD5Hash md5) throws MalformedURLException
public Page(String urlString, float score) throws MalformedURLException
public Page(String urlString, float score, long nextFetch) throws MalformedURLException
public Page(String urlString, float score, float nextScore, long nextFetch) throws MalformedURLException
Method Detail |
public void readFields(DataInput in) throws IOException
Writable
in
. For efficiency,
implementations should attempt to re-use storage in the existing object
where possible.
readFields
in interface Writable
IOException
public void set(Page that)
public void write(DataOutput out) throws IOException
write
in interface Writable
IOException
public int compareTo(Object o)
compareTo
in interface Comparable
public static Page read(DataInput in) throws IOException
IOException
public UTF8 getURL()
public void setURL(String url) throws MalformedURLException
MalformedURLException
public MD5Hash getMD5()
public void setMD5(MD5Hash md5)
public long getNextFetchTime()
public void setNextFetchTime(long nextFetch)
public byte getRetriesSinceFetch()
public void setRetriesSinceFetch(int retries)
public byte getFetchInterval()
public void setFetchInterval(byte fetchInterval)
public int getNumOutlinks()
public void setNumOutlinks(int numOutlinks)
public float getScore()
public float getNextScore()
public void setScore(float score)
public void setScore(float score, float nextScore)
public long computeDomainID() throws MalformedURLException
MalformedURLException
public String toString()
public String toTabbedString()
public boolean equals(Object o)
public int hashCode()
public Object clone()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |