/* (non-Javadoc)
@see net.timewalker.ffmq4.storage.data.DataStore#commit()
340389
@Override
	public void commitChanges() throws DataStoreException
    {
    	try
    	{
	    	SynchronizationBarrier barrier = new SynchronizationBarrier();
	    	journal.commit(barrier);
	    	barrier.waitFor();
    	}
    	catch (InterruptedException e)
    	{
    		throw new DataStoreException("Wait for commit barrier was interrupted");
    	}
    }
856421
void commit(boolean onePhase) throws XAException {
		if (this.getProgressState() == XAResourceProgressState.COMMITTED) {
			return;
		}

		if (this.hasHeuristicOutcome()) {
			throw new XAException(this.heuristicState);
		}
		if (!checkTXRequirements()) {
			throw new SampleTransactionalException("State not transactional "
					+ this);
		}

		this.checkRollback();

		if (this.getProgressState() != XAResourceProgressState.ACTIVE
				&& onePhase) {
			throw new XAException(XAException.XAER_RMFAIL);
		} else if (this.getProgressState() != XAResourceProgressState.PREPARED
				&& !onePhase) {
			throw new XAException(XAException.XAER_RMFAIL);
		} else if (this.getProgressState() != XAResourceProgressState.PREPARED
				&& this.getProgressState() != XAResourceProgressState.ACTIVE) {
			throw new XAException(XAException.XAER_RMFAIL);
		}

		this.setProgressState(XAResourceProgressState.COMMITTING);
		try {
			this.getManagedConnection().commit(onePhase);
		} catch (Exception e) {
			throwXAException(XAException.XAER_PROTO, e);
		}

		this.setProgressState(XAResourceProgressState.COMMITTED);

	}
46362
@Override
    public final synchronized void commit(ContainerTx tx)
                    throws RemoteException
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "commit: " + getStateName(state), tx);

        if (removed) {
            if (isTraceOn && tc.isEntryEnabled())
                Tr.exit(tc, "commit: removed");
            return;
        }

        if (tx.ivRemoveBeanO == this)
        {
            completeRemoveMethod(tx); // d647928
        }
        else
        {
            // Perform normal afterCompletion processing.... calling
            // afterCompletion if present.
            setState(COMMITTING_OUTSIDE_METHOD, AFTER_COMPLETION); // d159152

            // Session Synchronization AfterCompletion needs to be called if either
            // the annotation (or XML) was specified or the bean implemented
            // the interface and a global transaction is active.        F743-25855
            if ((ivAfterCompletion != null || sessionSync != null) &&
                tx.isTransactionGlobal())
            {
                EJBThreadData threadData = EJSContainer.getThreadData();

                threadData.pushContexts(this);
                try
                {
                    if (ivAfterCompletion != null) {
                        invokeSessionSynchMethod(ivAfterCompletion, new Object[] { true });
                    } else {
                        sessionSync.afterCompletion(true);
                    }
                } finally
                {
                    threadData.popContexts();
                }
            }

            setState(AFTER_COMPLETION, METHOD_READY); // d159152
        }

        // currentTx is now reset in atCommit/atRollback AFTER the final pin
        // is undone.                                                      d258770
        // currentTx = null;                                            // PQ99986

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "commit: " + getStateName(state));
    }
746176
public void commit()
    {
        long        elapsed = System.nanoTime() - startTimeNanos;
        driver.addTrace(name, elapsed, TimeUnit.NANOSECONDS);
    }
1308966
void commit()
        throws IOException
    {
        if (_writer!=null && _writer.isWritten())
            _writer.flush();
        else
            _httpResponse.commit();
    }
835750
@Override
  public void commit()
      throws IOException {

    if (!this.actualProcessedCopyableFile.isPresent()) {
      return;
    }

    CopyableFile copyableFile = this.actualProcessedCopyableFile.get();
    Path stagingFilePath = getStagingFilePath(copyableFile);
    Path outputFilePath = getSplitOutputFilePath(copyableFile, this.outputDir,
        copyableFile.getDatasetAndPartition(this.copyableDatasetMetadata), this.state);

    log.info(String.format("Committing data from %s to %s", stagingFilePath, outputFilePath));
    try {
      setFilePermissions(copyableFile);

      Iterator<OwnerAndPermission> ancestorOwnerAndPermissionIt =
          copyableFile.getAncestorsOwnerAndPermission() == null ? Iterators.<OwnerAndPermission>emptyIterator()
              : copyableFile.getAncestorsOwnerAndPermission().iterator();

      ensureDirectoryExists(this.fs, outputFilePath.getParent(), ancestorOwnerAndPermissionIt);

      this.fileContext.rename(stagingFilePath, outputFilePath, renameOptions);
    } catch (IOException ioe) {
      log.error("Could not commit file %s.", outputFilePath);
      // persist file
      this.recoveryHelper.persistFile(this.state, copyableFile, stagingFilePath);
      throw ioe;
    } finally {
      try {
        this.fs.delete(this.stagingDir, true);
      } catch (IOException ioe) {
        log.warn("Failed to delete staging path at " + this.stagingDir);
      }
    }
  }
664113
public void commit(String logMessage) throws ServerException {
        assertNotInvalidated();
        m_mgr.doCommit(Server.USE_DEFINITIVE_STORE,
                       m_context,
                       m_obj,
                       logMessage,
                       m_pendingRemoval);
        m_committed = true;
        invalidate();
    }
654031
public void commit() {
        if (checkSession()) {
            return;
        }

        if (log.isDebugEnabled()) {
            log.debug(String.format("Committing transactional %s@%x",
                    sqlSession.getClass().getSimpleName(),
                    sqlSession.hashCode()));
        }

        sqlSession.commit();
    }
750584
public void commit(ObjectEnvelope mod) throws PersistenceBrokerException
    {
        mod.doInsert();
        mod.setModificationState(StateOldClean.getInstance());
    }
358771
void commit() {
    long index = this.index;
    for (ServerSessionContext session : sessions.sessions.values()) {
      session.commit(index);
    }
  }
520154
def _commit(self):
        
        if self._id is None:
            mode = _datastore_pb2.CommitRequest.NON_TRANSACTIONAL
        else:
            mode = _datastore_pb2.CommitRequest.TRANSACTIONAL

        commit_response_pb = self._client._datastore_api.commit(
            self.project, mode, self._mutations, transaction=self._id
        )
        _, updated_keys = _parse_commit_response(commit_response_pb)
        # If the back-end returns without error, we are guaranteed that
        # ``commit`` will return keys that match (length and
        # order) directly ``_partial_key_entities``.
        for new_key_pb, entity in zip(updated_keys, self._partial_key_entities):
            new_id = new_key_pb.path[-1].id
            entity.key = entity.key.completed_key(new_id)
792157
@SuppressWarnings("unchecked")
    @Override
    public Object commit(long batchId, Object state) {
        List<Object> stateList = (List<Object>) state;
        if (stateOperator != null) {
            Object commitState = stateOperator.commit(batchId, stateList);
            stateList.add(commitState);
        }
        return stateList;
    }
690309
public function commit()
    {
        if ($this->disableTransactionHandling) {
            return;
        }

        if (null === $this->session) {
            throw new RuntimeAdapterException('Transaction not started');
        }

        $this->session->commitTransaction();
        $this->session->endSession();
        $this->session = null;
    }
1122234
public void commit(final Xid xid, final boolean onePhase)
            throws XAException {

        final String methodName = "commit";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, new Object[] { xid,
                    Boolean.valueOf(onePhase) });
        }

        _siXaResource.commit(xid, onePhase);

        // Add the value false to indicate we have commited to the hashtable of
        // stats (keying off the xid)
        synchronized (_transactionStates) {

          _transactionStates.put (xid, Boolean.FALSE);

          if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            StringBuffer sb = new StringBuffer ("After adding the xid ");
            sb.append (xid);
            sb.append (" the hashtable of transactionStates now contains ");
            sb.append (_transactionStates.size());
            sb.append (" entries");
            SibTr.debug (this, TRACE, sb.toString());
          }

        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
1240041
public void commit(ObjectEnvelope mod) throws PersistenceBrokerException
    {
        mod.doDelete();
        mod.setModificationState(StateTransient.getInstance());
    }
32001
@Override
    public void commit() throws SQLException
    {
        checkClosed();
        if (props.getProperty(COMMIT_THROW_EXCEPTION, "true").equalsIgnoreCase("true")) {
            throw SQLError.noSupport();
        }
    }
558532
@Override
    public void commit() throws IllegalStateRuntimeException, TransactionRolledBackRuntimeException, JMSRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "commit");

        try {
            jmsSession.commit();
        } catch (IllegalStateException ise) {
            throw (IllegalStateRuntimeException) JmsErrorUtils.getJMS2Exception(ise, IllegalStateRuntimeException.class);
        } catch (TransactionRolledBackException trbe) {
            throw (TransactionRolledBackRuntimeException) JmsErrorUtils.getJMS2Exception(trbe, TransactionRolledBackRuntimeException.class);
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "commit");
        }

    }