Finishes loader

@throws Exception an exception raised in finishing loader.
971088
@Override
  public void finish() throws Exception
  {
    LOGGER.debug("Finish Loading");
    flushQueues();

    if (_is_last_finish_call)
    {
      try
      {
        if (_after != null)
        {
          LOGGER.debug("Running Execute After SQL");
          _processConn.createStatement().execute(_after);
        }
        // Loader sucessfully completed. Commit and return.
        _processConn.createStatement().execute("commit");
        LOGGER.debug("Committed");
      }
      catch (SQLException ex)
      {
        try
        {
          _processConn.createStatement().execute("rollback");
        }
        catch (SQLException ex0)
        {
          LOGGER.debug("Failed to rollback");
        }
        LOGGER.debug(String.format("Execute After SQL failed to run: %s", _after),
                     ex);
        throw new Loader.ConnectionError(Utils.getCause(ex));
      }
    }
  }
939013
public void finish()	//280584.3    6021: Cleanup of  defect 280584.2    WAS.webcontainer removed throws clause.
    {
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"finish", "entry");
        }
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        try
        {
            int length = getContentLength();
            if (length > 0)
            {
                _in.close();
            }
            // begin 280584.3    6021: Cleanup of  defect 280584.2    WAS.webcontainer: moved from finally block
            else
            {
                this._in.finish();
            }
            // end 280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer
        }
        catch (IOException e)
        {
            com.ibm.wsspi.webcontainer.util.FFDCWrapper.processException(e, "com.ibm.ws.webcontainer.srt.SRTServletRequest.finish", "875", this);
            // begin 280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer
            if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"finish", "Error occurred while finishing request", e);
            }
            // logger.logp(Level.SEVERE, CLASS_NAME,"finish", "IO.Error", e);
            //se = new ServletException(nls.getString("Error.occured.while.finishing.request", "Error occurred while finishing request"), e);
            // end 280584.3 6021: Cleanup of defect 280584.2 WAS.webcontainer
        }

        finally
        {
            cleanupFromFinish();
        }
    }
284600
public void run() throws Exception {
    try {

      CountDownLatch countDownLatch = new CountDownLatch(this.tasks);
      for (int i = 0; i < this.tasks; i++) {
        addTask(i, countDownLatch);
      }
      // Wait for the tasks to finish
      countDownLatch.await();
    } finally {
      try {
        // Calling close() will stop metric reporting
        this.context.close();
      } finally {
        this.executor.shutdownNow();
      }
    }
  }
1041292
@Override
  public synchronized void close() throws Exception {
    if (this.fileSystem != null && !this.fsClosed) {
      this.fileSystem.close();
      this.fsClosed = true;
    }
  }
1065772
protected void finish() {
        Reporter reporter = this.reporterThreadLocal.get();
        assertEquals("Detailed results found at: " + reporter.getFileName(), "0 errors",
                Integer.toString(reporter.getFails()) + ERRORS_CHECK);
    }
1280951
@PostConstruct
    public void init() throws Exception
    {
        long startTime = System.currentTimeMillis();
        
        filterLoader.putFiltersForClasses(config.getClassNames());
        manageFiles();
        startPoller();
        
        LOG.warn("Finished loading all zuul filters. Duration = " + (System.currentTimeMillis() - startTime) + " ms.");
    }
905420
public void finish() throws IOException {
    writer.append("--" + boundary + "--").append(LINE_BREAK);
    writer.flush();
    writer.close();
    outputStream.flush();
    outputStream.close();
  }
260730
public function finish(): void
    {
        foreach ($this->drivers as $name => $class) {
            $class->finish();
            unset($this->drivers[$name]);
        }

        $this->drivers = [];
    }
1084141
public void waitForCompletion() throws Exception {
    LOG.info("Waiting for the Job Driver to complete.");
    try {
      synchronized (this) {
        this.wait();
      }
    } catch (final InterruptedException ex) {
      LOG.log(Level.WARNING, "Waiting for result interrupted.", ex);
    }
    this.reef.close();
    this.controlListener.close();
  }
1246378
public void finish() {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
            logger.entering(CLASS_NAME,"finish","["+this+"]");

        if (!isCommitted()) {
            commit();
        }

        // flush the OutputStream and Writer
        try {
            flushBuffer(false);
            _rawOut.close();
        }
        catch (IOException e) {
            // Don't want to report errors on early browser closes
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"finish", "Servlet.Exception:.Error.while.finishing.response", e);
            }
        }
        finally {
            _rawOut.reset();
            // PK29451 - remove call to clearHeaders(). Implementation of clearHeaders() was empty,
            // which this method relies on, but has been implemented in PK29451 to make reset() work.
            // _response.clearHeaders();
            
            cleanupFromFinish();
            // LIBERTY _bufferedOut.reset();
            _bufferedWriter.reset();
            // LIBERTY this._responseBuffer = null;
        }

        resetState();

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
            logger.exiting(CLASS_NAME,"finish");
    }
883997
public void finished()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "finished");
      
		msgIterator = null;
		aiStream = null;
    
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "finished");
  }
522504
public function flush()
    {
        if (!$this->getClient()->flush()) {
            throw new \Exception($this->getClient()->getResultMessage(), $this->getClient()->getResultCode());
        }
    }
515709
@PostConstruct
    private void initCompleter() throws Exception{
        if( AUTO_COMPLETE_ENABLED ){
            log.debug( "Starting up HumanTaskAutoCompleter" );
            isStopped.set( false );
            thread = new Thread( new HTAutoCompleter() );
            thread.start();
        }
    }
1204417
public void finish() throws IOException
    {
        ensureNotFinished();
        flushBufferedData();
        compressedBuffer[MAGIC_LENGTH] = (byte) (COMPRESSION_METHOD_RAW | compressionLevel);
        writeIntLE(0, compressedBuffer, MAGIC_LENGTH + 1);
        writeIntLE(0, compressedBuffer, MAGIC_LENGTH + 5);
        writeIntLE(0, compressedBuffer, MAGIC_LENGTH + 9);
        assert MAGIC_LENGTH + 13 == HEADER_LENGTH;
        out.write(compressedBuffer, 0, HEADER_LENGTH);
        finished = true;
        out.flush();
    }
1237592
@Override
	public void close() throws Exception {
		if (enterUnlessClosed()) {
			try {
				try {
					// this class' own cleanup logic
					resourceManagerLeaderElectionService.shutdown();
					dispatcher.shutdownNow();
				}
				finally {
					// in any case must we call the parent cleanup logic
					super.close();
				}
			}
			finally {
				exit();
			}
		}
	}
131346
public void finish() throws IOException {
        //Map<String,Set<TypeLibInfo>> byPackage = new HashMap<String,Set<TypeLibInfo>>();
        //for( TypeLibInfo tli : generatedTypeLibs ) {
        //    Set<TypeLibInfo> s = byPackage.get(tli.packageName);
        //    if(s==null)
        //        byPackage.put(tli.packageName,s=new HashSet<TypeLibInfo>());
        //    s.add(tli);
        //}

        // for( Map.Entry<String,Set<TypeLibInfo>> e : byPackage.entrySet() ) {
        for( Package pkg : packages.values() ) {
            LibBinder lib1 = pkg.typeLibs.iterator().next();

            if(referenceResolver.suppress(lib1.lib))
                continue;

            // generate ClassFactory
            IndentingWriter o = pkg.createWriter(lib1,"ClassFactory.java");
            lib1.generateHeader(o);

            o.printJavadoc("Defines methods to create COM objects");
            o.println("public abstract class ClassFactory {");
            o.in();

            o.println("private ClassFactory() {} // instanciation is not allowed");
            o.println();

            for( LibBinder lib : pkg.typeLibs ) {
                int len = lib.lib.count();
                for( int i=0; i<len; i++ ) {
                    ICoClassDecl t = lib.lib.getType(i).queryInterface(ICoClassDecl.class);
                    if(t==null)     continue;
                    if(!t.isCreatable())    continue;

                    declareFactoryMethod(o, t);
                    t.dispose();
                }
            }

            o.out();
            o.println("}");
            o.close();
        }
    }
1210539
public void run() {
    while (running) {
      try {
        LOG.info("FileFixer continuing to run...");
        doFindFiles();
      } catch (Exception e) {
        LOG.error(StringUtils.stringifyException(e));
      } catch (Error err) {
        LOG.error("Exiting after encountering " +
                    StringUtils.stringifyException(err));
        shutdown();
        throw err;
      }
      try {
        // Sleep before proceeding to fix more files.
        Thread.sleep(blockFixInterval);
      } catch (InterruptedException ie) {
        LOG.error("Encountering InturruptedException " +
                   StringUtils.stringifyException(ie));
      }
    }
  }