|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.intermine.dataloader.DataTracker
public class DataTracker
Interface providing access to data tracking. This class is almost a generic map. However, it particularly maps from an Integer and a String to a String and a boolean, where entries are grouped by the Integer.
| Field Summary | |
|---|---|
protected java.lang.Exception |
broken
|
| Constructor Summary | |
|---|---|
DataTracker(Database db,
int maxSize,
int commitSize)
Constructor for DataTracker. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the data tracker of all entries. |
void |
clearObj(java.lang.Integer id)
Clears the cache for a particular object, in preparation for writing all the data for that object. |
void |
close()
Closes this DataTracker, releasing both connections to the database. |
boolean |
doWrite()
Performs maintenance of the cache, writing stuff to the backing database. |
void |
flush()
Flushes everything to the backing database. |
Source |
getSource(java.lang.Integer id,
java.lang.String field)
Retrieve the Source for a specified field of an Object stored in the database. |
void |
prefetchIds(java.util.Set<java.lang.Integer> ids)
Prefetches data for a specified set of object ids. |
void |
setSource(java.lang.Integer id,
java.lang.String field,
Source source)
Set the Source for a field of an object in the database |
java.lang.String |
sourceToString(Source source)
Converts a Source to a source name. |
Source |
stringToSource(java.lang.String name)
Converts a string sourcename to a Source. |
Source |
stringToSource(java.lang.String name,
java.lang.String type)
Converts a string sourcename to a Source if the type is known. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.Exception broken
| Constructor Detail |
|---|
public DataTracker(Database db,
int maxSize,
int commitSize)
db - a Database to back the trackermaxSize - maximum number of cache entriescommitSize - number of entries to write to the database at a time| Method Detail |
|---|
public void clear()
throws java.sql.SQLException
java.sql.SQLException - sometimespublic void prefetchIds(java.util.Set<java.lang.Integer> ids)
ids - a Set of Integers
public Source getSource(java.lang.Integer id,
java.lang.String field)
id - the ID of the objectfield - the name of the field
public void setSource(java.lang.Integer id,
java.lang.String field,
Source source)
id - the ID of the objectfield - the name of the fieldsource - the Source of the fieldpublic void clearObj(java.lang.Integer id)
id - the ID of the objectpublic boolean doWrite()
public void flush()
public void close()
public Source stringToSource(java.lang.String name)
name - a string source name
public Source stringToSource(java.lang.String name,
java.lang.String type)
name - a string source nametype - the source type
public java.lang.String sourceToString(Source source)
source - a Source
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||