Package org.intermine.sql.writebatch
Interface BatchWriter
-
- All Known Implementing Classes:
BatchWriterPostgresCopyImpl
,BatchWriterPreparedStatementImpl
,BatchWriterSimpleImpl
public interface BatchWriter
An interface representing an object that can flush a TableBatch to an SQL server Connection.- Author:
- Matthew Wakeling
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
updateStatistics(java.util.Map<java.lang.String,java.lang.Integer> activity, java.sql.Connection con)
Updates the per-table statistics held in this object, and may tell the SQL database to update its statistics using the supplied Connection.java.util.List<FlushJob>
write(java.sql.Connection con, java.util.Map<java.lang.String,? extends Table> tables, java.util.Set<java.lang.String> filter)
Performs all the processing for flushing a few tables to the connection, and returns a List of jobs to do the actual flushing.
-
-
-
Method Detail
-
write
java.util.List<FlushJob> write(java.sql.Connection con, java.util.Map<java.lang.String,? extends Table> tables, java.util.Set<java.lang.String> filter) throws java.sql.SQLException
Performs all the processing for flushing a few tables to the connection, and returns a List of jobs to do the actual flushing.- Parameters:
con
- the SQL connectiontables
- a Map from table name to Tablefilter
- a Set of table names to write, or null to write all tables- Returns:
- a List of jobs to run to actually do the flushing
- Throws:
java.sql.SQLException
- if there is an underlying DB problem
-
updateStatistics
void updateStatistics(java.util.Map<java.lang.String,java.lang.Integer> activity, java.sql.Connection con) throws java.sql.SQLException
Updates the per-table statistics held in this object, and may tell the SQL database to update its statistics using the supplied Connection.- Parameters:
activity
- a Map from table name to the amount of activity (in rows) as an Integercon
- a Connection, over which to talk to the database- Throws:
java.sql.SQLException
- if there is an underlying DB problem
-
-