@Warning(value="non-Api") @ThreadSafe public final class StateTable extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
StateTable.Type |
Constructor and Description |
---|
StateTable(Database db)
Table which saves harvested urls for HarvestRunner.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
create()
Creates this table in the database.
|
(package private) void |
drop()
Drops this table from the database.
|
boolean |
exists()
Returns true if this table exists in the database; false otherwise.
|
void |
finish(String archiveUrl,
Marker start,
Marker end)
Remove all temporary markers in finished range and mark start marker as
finished.
|
Marker |
getNewest(String archiveUrl)
Get newest marker of any type for a forum.
|
Marker |
getNewest(String archiveUrl,
StateTable.Type type)
Get either permanent or temporary marker, the newest known marker.
|
boolean |
put(String archiveUrl,
Marker marker)
Put a temporary marker.
|
int |
removeArchive(String archiveUrl)
Remove all states of an archive.
|
void |
update(String archiveUrl)
Recalculate the PERM marker by setting the newest FIN marked Marker,
which is not newer than any temporary marker to PERM and deleting all
older markers.
|
@Warning(value="non-Api") public StateTable(Database db)
db
- void create() throws SQLException
SQLException
void drop() throws SQLException
SQLException
public boolean exists() throws SQLException
SQLException
public Marker getNewest(String archiveUrl) throws SQLException
archiveUrl
- SQLException
public Marker getNewest(String archiveUrl, StateTable.Type type) throws SQLException
archiveUrl
- type
- SQLException
public boolean put(String archiveUrl, Marker marker) throws SQLException
SQLException
public void finish(String archiveUrl, Marker start, Marker end) throws SQLException
archiveUrl
- start
- end
- SQLException
public void update(String archiveUrl) throws SQLException
archiveUrl
- SQLException
public int removeArchive(String archiveUrl) throws SQLException
archiveUrl
- SQLException