Flushes batch statements and commits database connection.

@param force forces connection commit
489820
public void commit(boolean force) {
        if (checkSession()) {
            return;
        }

        if (log.isDebugEnabled()) {
            ToStringBuilder tsb = new ToStringBuilder(String.format("Committing transactional %s@%x",
                    sqlSession.getClass().getSimpleName(),sqlSession.hashCode()));
            tsb.append("force", force);
            log.debug(tsb.toString());
        }

        sqlSession.commit(force);
    }
1262471
@Override
  public void flush(boolean forceSync)
      throws IOException {
    if (checksumOut != null) {
      checksumOut.flush();
      if (forceSync && (cout instanceof FileOutputStream)) {
        ((FileOutputStream) cout).getChannel().force(true);
      }
    }
    if (blockDataWriter != null) {
      blockDataWriter.flush();
      if (forceSync) {
        blockDataWriter.force(true);
      }
    }
  }
65154
public void forceFlushWithBestEffort() {
    LOG.info("Forcing to flush data to socket with best effort.");
    while (!outgoingPacketsToWrite.isEmpty()) {
      int writeState = outgoingPacketsToWrite.poll().writeToChannel(socketChannel);
      if (writeState != 0) {
        LOG.info("Failed to write more to Socket. Clear and finish the flush.");
        clear();
        return;
      }
    }
  }
1214167
void commit(ByteBuffer bb)
    {
        content.limit(Math.max(content.limit(), bb.position()));
        boolean removed = refSet.removeItem(content, bb);
        assert removed;
    }
1157771
private void delete(Commit<DeleteCommand> commit) {
    try {
      if (value != null) {
        value.close();
        value = null;
      }
    } finally {
      commit.close();
    }
  }
369561
@SuppressWarnings("unchecked")
  void commit() {
    // Execute any tasks that were queue during execution of the command.
    if (!tasks.isEmpty()) {
      for (ServerTask task : tasks) {
        context.update(context.index(), context.clock().instant(), ServerStateMachineContext.Type.COMMAND);
        try {
          task.future.complete(task.callback.get());
        } catch (Exception e) {
          task.future.completeExceptionally(e);
        }
      }
      tasks.clear();
    }
    context.commit();
  }
509076
public function flushCacheState(bool $force = false): void
    {
        if ((!empty($this->newCacheState) && is_writable($this->cacheDir)) || $force) {
            $fullCacheMap = $this->newCacheState + $this->cacheState;
            $cachePath    = substr(var_export($this->cacheDir, true), 1, -1);
            $rootPath     = substr(var_export($this->appDir, true), 1, -1);
            $cacheData    = '<?php return ' . var_export($fullCacheMap, true) . ';';
            $cacheData    = strtr($cacheData, [
                '\'' . $cachePath => 'AOP_CACHE_DIR . \'',
                '\'' . $rootPath  => 'AOP_ROOT_DIR . \''
            ]);
            $fullCacheFileName = $this->cacheDir . self::CACHE_FILE_NAME;
            file_put_contents($fullCacheFileName, $cacheData, LOCK_EX);
            // For cache files we don't want executable bits by default
            chmod($fullCacheFileName, $this->fileMode & (~0111));

            if (function_exists('opcache_invalidate')) {
                opcache_invalidate($fullCacheFileName, true);
            }
            $this->cacheState    = $this->newCacheState + $this->cacheState;
            $this->newCacheState = [];
        }
    }
179035
def commit(self):
        
        if hasattr(self.local, 'tx') and self.local.tx:
            tx = self.local.tx.pop()
            tx.commit()
            self._flush_tables()
1101633
@Override
	public void commit() {
		List<Key> deletes = new ArrayList<Key>();
		deletes.add(Translation.toEntity(lock, Keys.create(
				Translation.toKind(entity.getClass()), 
				Entities.keyValue(entity))).getKey());
		Key transactionKey = KeyFactory.stringToKey(lock.transaction());
		
		if (Keys.ancestor(transactionKey).equals(
				Keys.create(Translation.toKind(entity.getClass()), Entities.keyValue(entity)))) {
			deletes.add(transactionKey);
			
			for (Entity entity : datastore.query(
					new Query(transactionKey).setKeysOnly())) {
				deletes.add(entity.getKey());
			}
		}
		
		Key parent = Keys.create(Translation.toKind(entity.getClass()), Entities.keyValue(entity));
		apply(operation, entity, Translation.toEntity(lock, parent).getKey(), deletes);
	}
319787
@Override
    public void commit() throws InvalidKBException {
        if (isClosed()) {
            return;
        }
        try {
            checkMutationAllowed();
            removeInferredConcepts();
            validateGraph();
            // lock on the keyspace cache shared between concurrent tx's to the same keyspace
            // force serialization & atomic updates, keeping Janus and our KeyspaceCache in sync
            synchronized (keyspaceCache) {
                commitTransactionInternal();
                transactionCache.flushToKeyspaceCache();
            }
        } finally {
            String closeMessage = ErrorMessage.TX_CLOSED_ON_ACTION.getMessage("committed", keyspace());
            closeTransaction(closeMessage);
        }
    }
590791
public void setCommittedTxId(long txid, boolean force) {
    for (AsyncLogger logger : loggers) {
      logger.setCommittedTxId(txid, force);
    }
  }
355306
def force_flush(
            self):
        
        self.debug_log('force flush requested')
        self.perform_work(
            self.queue,
            self.shutdown_event,
            self.shutdown_ack,
            self.already_done)
360228
public void commit() {
        log.debug("Performing commit");
        for (CompensatingTransactionOperationExecutor operationExecutor : operationExecutors) {
            try {
                operationExecutor.commit();
            } catch (Exception e) {
                throw new TransactionSystemException(
                        "Error occurred during commit", e);
            }
        }
    }
1133547
@Override
    public synchronized void commit() throws DatabaseEngineRuntimeException {
        /*
         * Reconnect on this method does not make sense since a new connection will have nothing to commit.
         */
        try {
            conn.commit();
            conn.setAutoCommit(true);
        } catch (final SQLException ex) {
            throw new DatabaseEngineRuntimeException("Something went wrong while committing transaction", ex);
        }
    }
364939
@Override
	public void commit() {
		if (conn != null) {
			try {
				conn.commit();
			} catch (SQLException e) {
				throw new UroborosqlSQLException(e);
			}
		}
	}
1048019
private void onCleanup(Object connection)
    {
        // if not running within transaction boundary
        if (this.connection != null)
        {
            if (settings != null)
            {
                ((Jedis) connection).configResetStat();
            }
            factory.releaseConnection((Jedis) this.connection);
        }

        this.connection = null;
    }
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;
    }