<pre>
Use this API to force the sync in secondary Netscaler.
@param force set this to true for forcesync
@param save set this to YES,if want to save the configuration after sync.
@return status of the operation performed.
</pre>
556425
public base_response forcehasync(Boolean force, String save) throws Exception
	{
		hasync resource = new hasync();
		resource.set_force(force) ;
		resource.set_save(save);
		options option = new options();
		option.set_action("force");
		base_response result = resource.perform_operation(this,option);
		return result;
	}
492412
@Override
	public void commitChanges( SynchronizationBarrier barrier ) throws JMSException
    {
    	checkNotClosed();
    	checkTransactionLock();
    	
    	if (persistentStore != null)
    	{
    		long start = System.currentTimeMillis();
    		synchronized (storeLock)
			{
    			persistentStore.commitChanges(barrier);
			}
    		long end = System.currentTimeMillis();
    		notifyCommitTime(end-start);

    		// Clear pending commit flag
    		pendingChanges = false;
    	}
    }
179249
public static br force_reboot(nitro_service client, br resource) throws Exception
	{
		return ((br[]) resource.perform_operation(client, "force_reboot"))[0];
	}
134682
void force() throws InternalLogException
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "force", this);

        // Check that the file is actually open
        if (_activeFile == null)
        {
            if (tc.isEntryEnabled())
                Tr.exit(tc, "force", "InternalLogException");
            throw new InternalLogException(null);
        }

        // Attempt to get exclusive lock on the lock object provided by RecoveryLogService
        // to protect access to the isSuspended flag, which is toggled during calls
        // to RecoveryLogService suspend/resume
        synchronized (RLSControllerImpl.SUSPEND_LOCK)
        {
            while (RLSControllerImpl.isSuspended())
            {
                try
                {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, "Waiting for RecoveryLogService to resume");
                    RLSControllerImpl.SUSPEND_LOCK.wait();
                } catch (InterruptedException exc)
                {
                    // This exception is received if another thread interrupts this thread by calling this threads 
                    // Thread.interrupt method. The RecoveryLogService class does not use this mechanism for 
                    // breaking out of the wait call - it uses notifyAll to wake up all waiting threads. This
                    // exception should never be generated. If for some reason it is called then ignore it and 
                    // start to wait again.
                    FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.LogHandle.force", "834", this);
                }
            }

            // Check if we've been configured to run in snapshot safe mode
            // With this in place we synchronize all force method calls and
            // take the synchronization performance hit.  The benefit is that we
            // can be sure that the log files will be in a consistent state
            // for snapshotting
            if (Configuration._isSnapshotSafe)
            {
                _activeFile.force();
            }
        }

        //  If we're not configured to be snapshot safe then we
        //  run a slight risk here that a force operation could be called
        //  just after the RecoveryLogService has been called to suspend,
        //  as we're outwith the sync block.
        //  The benefit is that we don't have the synchronization performance 
        //  hit when calling the force method 
        if (!Configuration._isSnapshotSafe)
        {
            _activeFile.force();
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "force");
    }
335664
@Override
    public synchronized boolean checkConnection(final boolean forceReconnect) {
        if (checkConnection(conn)) {
            return true;
        } else if (forceReconnect) {
            try {
                connect();
                recover();

                return true;
            } catch (final Exception ex) {
                logger.debug(dev, "reconnection failure", ex);
                return false;
            }
        }

        return false;
    }
688466
public function synchronize($className, $force)
    {
        $this->logger->notice(
            'Start of ' . ($force ? 'forced ' : '') . 'synchronization for {className}.',
            array('className' => $className)
        );

        $this->className = $className;
        $this->mapper->setForce($force);

        $this->sourceQueue = $this->source->getObjectsOrderedById();
        $this->sourceQueue->rewind();

        $this->destinationQueue = $this->destination->getObjectsOrderedById($className);
        $this->destinationQueue->rewind();

        while ($this->sourceQueue->valid() && $this->destinationQueue->valid()) {
            $this->compareQueuesAndReactAccordingly();
        }

        $this->insertRemainingSourceObjects();
        $this->deleteRemainingDestinationObjects();

        $this->destination->commit();
        $this->logger->notice('End of synchronization for {className}.', array('className' => $className));
    }
652006
def save(self, force_insert=False, force_update=False, using=None,
             update_fields=None):
        
        # Always create a new entry, instead of updating an existing model
        self.pk = None  # pylint: disable=invalid-name
        super(ConfigurationModel, self).save(
            force_insert,
            force_update,
            using,
            update_fields
        )
        cache.delete(self.cache_key_name(*[getattr(self, key) for key in self.KEY_FIELDS]))
        if self.KEY_FIELDS:
            cache.delete(self.key_values_cache_key_name())
754962
def salesforce_sync
      return if self.salesforce_skip_sync?
      if salesforce_perform_async_call?
        Delayed::Job.enqueue(SalesforceArSync::SalesforceObjectSync.new(self.class.salesforce_web_class_name, salesforce_id, salesforce_attributes_to_update), :priority => 50)
      else
        if salesforce_object_exists?
          salesforce_update_object(salesforce_attributes_to_update) if salesforce_attributes_to_update.present?
        else
          salesforce_create_object(salesforce_attributes_to_update(!new_record?)) if salesforce_id.nil?
        end
      end
    rescue Exception => ex
      self.errors[:base] << ex.message
      return false
    end
441733
private Future<?> flushDataFrom(List<CommitLogSegment> segments, boolean force)
    {
        if (segments.isEmpty())
            return Futures.immediateFuture(null);
        final ReplayPosition maxReplayPosition = segments.get(segments.size() - 1).getContext();

        // a map of CfId -> forceFlush() to ensure we only queue one flush per cf
        final Map<UUID, ListenableFuture<?>> flushes = new LinkedHashMap<>();

        for (CommitLogSegment segment : segments)
        {
            for (UUID dirtyCFId : segment.getDirtyCFIDs())
            {
                Pair<String,String> pair = Schema.instance.getCF(dirtyCFId);
                if (pair == null)
                {
                    // even though we remove the schema entry before a final flush when dropping a CF,
                    // it's still possible for a writer to race and finish his append after the flush.
                    logger.debug("Marking clean CF {} that doesn't exist anymore", dirtyCFId);
                    segment.markClean(dirtyCFId, segment.getContext());
                }
                else if (!flushes.containsKey(dirtyCFId))
                {
                    String keyspace = pair.left;
                    final ColumnFamilyStore cfs = Keyspace.open(keyspace).getColumnFamilyStore(dirtyCFId);
                    // can safely call forceFlush here as we will only ever block (briefly) for other attempts to flush,
                    // no deadlock possibility since switchLock removal
                    flushes.put(dirtyCFId, force ? cfs.forceFlush() : cfs.forceFlush(maxReplayPosition));
                }
            }
        }

        return Futures.allAsList(flushes.values());
    }
590791
public void setCommittedTxId(long txid, boolean force) {
    for (AsyncLogger logger : loggers) {
      logger.setCommittedTxId(txid, force);
    }
  }
833653
public function save(array $options = array(), $force = false)
    {
        if ( $force || $this->validate() )
        {
            return $this->performSave($options);
        } else
        {
            return false;
        }
    }
597575
public Promise<Void> forceAndClose(boolean forceMetadata) {
		if (!isOpen()) return Promise.ofException(FILE_CLOSED);
		return ofBlockingRunnable(executor, () -> {
			try {
				channel.force(forceMetadata);
				channel.close();
			} catch (IOException e) {
				throw new UncheckedException(e);
			}
		});
	}
1359228
public static br force_stop(nitro_service client, br resource) throws Exception
	{
		return ((br[]) resource.perform_operation(client, "force_stop"))[0];
	}
481681
public synchronized void shutdown(boolean force) {

        if (shutdown) {
            return;
        }

        String ltransactionListenerProcessorHandle = transactionListenerProcessorHandle;
        transactionListenerProcessorHandle = null;
        if (null != ltransactionListenerProcessorHandle) {

            try {
                unregisterBlockListener(ltransactionListenerProcessorHandle);
            } catch (Exception e) {
                logger.error(format("Shutting down channel %s transactionListenerProcessorHandle", name), e);
            }
        }

        String lchaincodeEventUpgradeListenerHandle = chaincodeEventUpgradeListenerHandle;
        chaincodeEventUpgradeListenerHandle = null;
        if (null != lchaincodeEventUpgradeListenerHandle) {

            try {
                unregisterChaincodeEventListener(lchaincodeEventUpgradeListenerHandle);
            } catch (Exception e) {
                logger.error(format("Shutting down channel %s chaincodeEventUpgradeListenr", name), e);
            }
        }

        initialized = false;
        shutdown = true;

        final ServiceDiscovery lserviceDiscovery = serviceDiscovery;
        serviceDiscovery = null;
        if (null != lserviceDiscovery) {
            lserviceDiscovery.shutdown();
        }

        if (chainCodeListeners != null) {
            chainCodeListeners.clear();

        }

        if (blockListeners != null) {
            blockListeners.clear();
        }

        if (client != null) {
            client.removeChannel(this);
        }

        client = null;

        for (Peer peer : new ArrayList<>(getPeers())) {

            try {
                removePeerInternal(peer);
                peer.shutdown(force);
            } catch (Exception e) {
                // Best effort.
            }
        }
        peers.clear(); // make sure.

        peerEndpointMap.clear();
        ordererEndpointMap.clear();

        //Make sure
        for (Set<Peer> peerRoleSet : peerRoleSetMap.values()) {
            peerRoleSet.clear();
        }

        for (Orderer orderer : getOrderers()) {
            orderer.shutdown(force);
        }

        orderers.clear();

        if (null != eventQueueThread) {
            eventQueueThread.interrupt();
            eventQueueThread = null;
        }
        ScheduledFuture<?> lsweeper = sweeper;
        sweeper = null;

        if (null != lsweeper) {
            lsweeper.cancel(true);
        }

        ScheduledExecutorService lse = sweeperExecutorService;
        sweeperExecutorService = null;
        if (null != lse) {
            lse.shutdownNow();
        }
    }
1301068
public function save($force=false)
    {
        if (!self::$_loaded) {
            self::_loadColumns();
        }

        // check for callbacks before validation below
        $calling = get_called_class();
        if (!self::_checkCallback($calling, "before_save", $this)) {
            return false;
        }

        // with all the before callbacks checked, check if its valid
        if (!$this->isValid()) {
            return false;
        }

        $pk         = $calling::isIgnoringCase() ? strtolower($calling::getPK()) : $calling::getPK();
        $pk_value   = array_key_exists($pk, $this->_data) ? $this->_data[$pk] : null;
        $attrs      = $this->_data;

        if (!$pk_value) {
            // if there is a method to get the new primary key value on the class, 
            // call it
            if (method_exists($calling, "getNewPKValue")) {
                $pk_value = $calling::getNewPKValue();
                if (!$this->_data[$pk]) {
                    $this->_data[$pk] = $pk_value;
                }
                $attrs = $this->_data;
            }
        }

        // if found a primary key value, check if exists
        if ($pk_value) {
            $this->_new_rec = !self::find($pk_value);
        }

        $rst    = false;
        $newr   = false;

        if ($this->_new_rec) {
            $newr = true;
            self::_checkCallback($calling, "before_create", $this);
            $rst = $this->_insert($attrs, $calling, $pk, $pk_value);
        } else {
            self::_checkCallback($calling, "before_update", $this);

            // no need to update if there weren't changes
            if (sizeof($this->changed()) < 1 && !$force) {
                Log::log("No changes, not updating");
                $rst = true;
            } else {
                $rst = $this->_update($attrs, $calling, $pk, $pk_value);
            }
        }

        if ($rst) {
            self::_checkCallback($calling, "after_save", $this);
            if ($newr) {
                self::_checkCallback($calling, "after_create", $this);
            } else {
                self::_checkCallback($calling, "after_update", $this);
            }
        }
        $this->_prev_data = $this->_data;
        return $rst;
    }
18416
public void sync() {

        if (isClosed) {
            return;
        }

        synchronized (fileStreamOut) {
            if (needsSync) {
                if (busyWriting) {
                    forceSync = true;

                    return;
                }

                try {
                    fileStreamOut.flush();
                    outDescriptor.sync();

                    syncCount++;
                } catch (IOException e) {
                    Error.printSystemOut("flush() or sync() error: "
                                         + e.toString());
                }

                needsSync = false;
                forceSync = false;
            }
        }
    }
489943
@SuppressWarnings("resource")
	public static ISynchronizationPoint<IOException> savePropertiesFile(Properties properties, File file, Charset charset, byte priority) {
		FileIO.ReadWrite io = new FileIO.ReadWrite(file, priority);
		AsyncWork<Void,IOException> resize = io.setSizeAsync(0);
		SynchronizationPoint<IOException> result = new SynchronizationPoint<>();
		resize.listenInline(new Runnable() {
			@Override
			public void run() {
				if (resize.hasError()) {
					result.error(resize.getError());
					io.closeAsync();
					return;
				}
				savePropertiesFile(properties, io, charset, priority, true).listenInline(result);
			}
		});
		return result;
	}