org.jumpmind.symmetric.io.data.writer
Class PostgresBulkDatabaseWriter

java.lang.Object
  extended by org.jumpmind.symmetric.io.data.writer.DatabaseWriter
      extended by org.jumpmind.symmetric.io.data.writer.PostgresBulkDatabaseWriter
All Implemented Interfaces:
IDataResource, IDataWriter

public class PostgresBulkDatabaseWriter
extends DatabaseWriter


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jumpmind.symmetric.io.data.writer.DatabaseWriter
DatabaseWriter.LoadStatus
 
Field Summary
protected  org.postgresql.copy.CopyIn copyIn
           
protected  org.postgresql.copy.CopyManager copyManager
           
protected  org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor jdbcExtractor
           
protected  int loadedRows
           
protected  int maxRowsBeforeFlush
           
 
Fields inherited from class org.jumpmind.symmetric.io.data.writer.DatabaseWriter
batch, conflictResolver, context, CUR_DATA, currentDmlStatement, lastApplyChangesOnly, lastData, lastUseConflictDetection, log, missingTables, platform, sourceTable, statistics, targetTable, targetTables, transaction, uncommittedCount, writerSettings
 
Constructor Summary
PostgresBulkDatabaseWriter(IDatabasePlatform platform, org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor jdbcExtractor, int maxRowsBeforeFlush)
           
 
Method Summary
 void end(Batch batch, boolean inError)
           
 void end(org.jumpmind.db.model.Table table)
           
protected  void endCopy()
           
protected  void flush()
           
 void open(DataContext context)
           
protected  void startCopy()
           
 void write(CsvData data)
           
 
Methods inherited from class org.jumpmind.symmetric.io.data.writer.DatabaseWriter
checkForEarlyCommit, close, commit, containsNullLookupKeyDataSinceLastStatement, create, delete, doesColumnNeedUpdated, execute, filterAfter, filterBefore, filterError, getBatch, getConflictResolver, getContext, getCurData, getCurrentDmlStatement, getLookupDataMap, getLookupKeyData, getPkDataFor, getPlatform, getRowData, getSourceTable, getSqlStatements, getStatistics, getTargetTable, getTransaction, getWriterSettings, hasFilterThatHandlesMissingTable, insert, logFailure, lookupTableAtTarget, notifyFiltersBatchCommitted, notifyFiltersBatchComplete, notifyFiltersBatchRolledback, notifyFiltersEarlyCommit, preprocessSqlStatement, quoteString, requireNewStatement, rollback, script, setConflictResolver, sql, start, start, update, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jdbcExtractor

protected org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor jdbcExtractor

maxRowsBeforeFlush

protected int maxRowsBeforeFlush

copyManager

protected org.postgresql.copy.CopyManager copyManager

copyIn

protected org.postgresql.copy.CopyIn copyIn

loadedRows

protected int loadedRows
Constructor Detail

PostgresBulkDatabaseWriter

public PostgresBulkDatabaseWriter(IDatabasePlatform platform,
                                  org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor jdbcExtractor,
                                  int maxRowsBeforeFlush)
Method Detail

write

public void write(CsvData data)
Specified by:
write in interface IDataWriter
Overrides:
write in class DatabaseWriter

flush

protected void flush()

open

public void open(DataContext context)
Specified by:
open in interface IDataResource
Overrides:
open in class DatabaseWriter

startCopy

protected void startCopy()

endCopy

protected void endCopy()

end

public void end(org.jumpmind.db.model.Table table)
Specified by:
end in interface IDataWriter
Overrides:
end in class DatabaseWriter

end

public void end(Batch batch,
                boolean inError)
Specified by:
end in interface IDataWriter
Overrides:
end in class DatabaseWriter


Copyright © 2007-2014 JumpMind, Inc.. All Rights Reserved.