/** * Create an instance to track counters. Note that when this instance is created, it will * attempt to load it's state from the entity manager. In the case of using this when resuming, * be sure you begin processing where the system thinks * it has left off. * * @param emf Entity Manager Factory * @param fileImport File Import Entity * @param flushCount The number of success + failures to accumulate before flushing */ public FileImportTracker( final EntityManagerFactory emf, final FileImport fileImport, final int flushCount ) { this.emf = emf; this.flushCount = flushCount; this.fileImport = fileImport; this.entitiesWritten.addAndGet( fileImport.getImportedEntityCount() ); this.entitiesFailed.addAndGet( fileImport.getFailedEntityCount() ); this.connectionsWritten.addAndGet( fileImport.getImportedConnectionCount() ); this.connectionsFailed.addAndGet( fileImport.getFailedConnectionCount() ); }
updated.getFailedConnectionCount() );