|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
IWebDBWriter is an interface to the consolidated page/link database. It permits certain kinds of operations. This database may be implemented in several different ways (single or muli-pass, single-machine or distributed). The user of this interface has no idea which one is being used. They all commit to the IWebDBWriter contract. Note that changes to a webdb are finalized upon the call to close(). Before the call to close() returns, any readers of the database should see the db in a pristine pre-write state.
Method Summary | |
void |
addLink(Link link)
addLink(Link) will add the given Link to the webdb. |
void |
addPage(Page page)
addPage(Page page) will insert a Page object into the webdb. |
void |
addPageIfNotPresent(Page page)
addPageIfNotPresent(Page) works just like addPage(), except that the insertion will not take place if there is already a Page with that URL in the webdb. |
void |
addPageIfNotPresent(Page page,
Link link)
addPageIfNotPresent(Page, Link) works just like the above addPage(), except that a Link is also conditionally added to the webdb. |
void |
addPageWithScore(Page page)
addPageWithScore(Page page) inserts a Page into the webdb. |
void |
close()
Flush and complete all writes to the db. |
void |
deletePage(String url)
deletePage(url) will remove a Page object from the db with the given URL. |
Method Detail |
public void close() throws IOException
IOException
public void addPage(Page page) throws IOException
IOException
public void addPageWithScore(Page page) throws IOException
IOException
public void addPageIfNotPresent(Page page) throws IOException
IOException
public void addPageIfNotPresent(Page page, Link link) throws IOException
IOException
public void deletePage(String url) throws IOException
IOException
public void addLink(Link link) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |