/*
(non-Javadoc)

@see com.ibm.ws.sib.store.Cursor#finished()
961081
public final void finished()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "finished");

        synchronized(_subCursors)
        {
            for (int priority = Priorities.LOWEST_PRIORITY; priority <= Priorities.HIGHEST_PRIORITY; priority++)
            {
                if (null != _subCursors[priority])
                {
                    _subCursors[priority].finished();
                    _subCursors[priority] = null;
                }
            }
        }
        _owningList._removeCursor(this);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "finished");
    }
400020
def finished(self):
        
        self.data_service.update_activity(self.id, self.name, self.desc,
                                          started_on=self.started,
                                          ended_on=self._current_timestamp_str())
680831
public final void finished()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "finished");

        if (null != _lastLink)
        {
            _lastLink.cursorRemoved();
            _lastLink = null;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "finished");
    }
433620
@Override
    public synchronized void complete() {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINEST)) {
            logger.entering(CLASS_NAME, "complete",this);
        }

        if (!lockHeldByDifferentThread())
        {
            //We can't call this or WebContainer won't know to run the complete runnable which kicks off the async listeners
            //        WebContainerRequestState.getInstance(true).setAsyncMode(false);

            if (!completePending){
                //Move this inside of if block because it complete is called
                //after a previous complete, you can get a NPE because the
                //request may have already been cleaned up. If complete is not
                //pending, then it shouldn't have been cleaned up.
                
                if (com.ibm.ws.webcontainer.osgi.WebContainer.getServletContainerSpecLevel() > 31) {
                    //setAsyncStarted(false) upon exit service()
                    WebContainerRequestState reqState = WebContainerRequestState.getInstance(true);
                    reqState.setAttribute("webcontainer.resetAsyncStartedOnExit", "true"); 
                }
                else {
                    iExtendedRequest.setAsyncStarted(false);
                }

                createNewAsyncServletReeentrantLock();

                cancelAsyncTimer();

                completeRunnable = new CompleteRunnable(iExtendedRequest,this);
                completePending = true;
                if (!dispatching){
                    executeNextRunnable();
                }

            }
        } else {
            if (WCCustomProperties.THROW_EXCEPTION_WHEN_UNABLE_TO_COMPLETE_OR_DISPATCH) {
                throw new IllegalStateException(nls.getString("AsyncContext.lock.already.held", "Unable to obtain the lock.  Error processing has already been invoked by another thread."));
            }
        }

        dispatchURI = null;

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINEST)) {
            logger.exiting(CLASS_NAME, "complete",this);
        }

    }
635952
public void finishAppending()
  {
    checkStateTransition(this.state, SegmentState.APPENDING, SegmentState.APPEND_FINISHED);
    this.state = SegmentState.APPEND_FINISHED;
  }
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));
      }
    }
  }
951521
protected void finishConnection() {
    this.connector.dispose();
    this.connector = null;
    for (ConnectionListener listener : this.connectionListeners) {
      listener.connectionEnded(this);
    }
    if (this.executors != null) {
      this.executors.destroy();
    }
  }
1077628
private static void finish() {

		if (progress.getMax() != null) {

			StringBuilder output = new StringBuilder();
			output.append("\nTile Generation: ").append(progress.getProgress())
					.append(" of ").append(progress.getMax());

			if (geoPackage != null) {
				try {
					GeoPackageTextOutput textOutput = new GeoPackageTextOutput(
							geoPackage);
					output.append("\n\n");
					output.append(textOutput.header());
					output.append("\n\n");
					output.append(textOutput.tileTable(tileTable));

				} finally {
					geoPackage.close();
				}
			}

			System.out.println(output.toString());
		}
	}
169608
public void finish() throws IOException{

		writer.write("CREATE INDEX articleIdx ON revisions(ArticleID);\r\n");
		writer.write("ALTER TABLE index_articleID_rc_ts ENABLE KEYS;\r\n");
		writer.write("ALTER TABLE index_revisionID ENABLE KEYS;\r\n");
		writer.write("ALTER TABLE index_chronological ENABLE KEYS;\r\n");
		writer.flush();

	}
112595
function _finish() {
    done++;
    if ( count === 0 || done === count ) {
      rtn.sort(Trip.sortByDepartureTime);
      return callback(null, rtn);
    }
  }
932232
public void finish() {
        try {
            if (switcher.getCurrentMode() == STTYMode.RAW && lineCount > 0) {
                out.write('\r');
                out.write('\n');
                out.flush();
            }
            lineCount = 0;
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
241904
@Override
	public void afterCompletion(int status) {
		// clean up transactions that aren't managed by Spring
		for (DataAccess<SimpleFeatureType, SimpleFeature> dataStore : transactions.keySet()) {
			// we must manage transaction ourselves for non-JDBC !
			if (!(dataStore instanceof JDBCDataStore)) {
				Transaction transaction = transactions.get(dataStore);
				try {
					switch (status) {
						case TransactionSynchronization.STATUS_COMMITTED:
							transaction.commit();
							break;
						case TransactionSynchronization.STATUS_ROLLED_BACK:
							transaction.rollback();
							break;
						case TransactionSynchronization.STATUS_UNKNOWN:
					}
				} catch (IOException e) {
					try {
						transaction.rollback();
					} catch (IOException e1) {
						log.debug("Could not rollback geotools transaction", e1);
					}
				} finally {
					try {
						transaction.close();
					} catch (IOException e) {
						log.debug("Could not close geotools transaction", e);
					}
				}
			}
		}
		transactions.clear();
	}
145673
public void completed(TaskAttemptID taskid) {
    //
    // Record that this taskid is complete
    //
    completedTask(taskid, TaskStatus.State.SUCCEEDED);
        
    // Note the successful taskid
    setSuccessfulTaskid(taskid);
    
    //
    // Now that the TIP is complete, the other speculative 
    // subtasks will be closed when the owning tasktracker 
    // reports in and calls shouldClose() on this object.
    //

    this.completes++;
    this.execFinishTime = JobTracker.getClock().getTime();
    recomputeProgress();
    
  }
350703
def _finish(self):
        """"""
        self.finished = True
        if self._callback:
            self._callback(self)
        self._finish_event.set()
956173
@Override
	public boolean reachedEnd() {
		try {
			if (resultSet.isLast()) {
				resultSet.close();
				statement.close();
				dbConn.close();
				return true;
			} else {
				return false;
			}
		} catch (SQLException e) {
			throw new IllegalArgumentException("Couldn't evaluate reachedEnd():\t" + e.getMessage());
		} catch (NullPointerException e) {
			throw new IllegalArgumentException("Couldn't access resultSet:\t" + e.getMessage());
		}
	}
1180458
public void finish() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Finishing " + this);
        }
        // if there is a print writer, flush any content unless it is already
        // closed. We don't need to do this with streams.
        if (null != this.outWriter) {
            this.outWriter.checkError();
        }
    }
1018291
public void finish() {
		if (startMeasure == null) {
			Say.info("No invokations are measured");
		}
		else {
			long total = System.currentTimeMillis() - startMeasure;
			double average = 1d * total / counter;
			logFinished(total, average);
		}
	}