Set settings for this index and wait end of indexing
496093
def set_settings!(new_settings, options = {}, request_options = {})
      res = set_settings(new_settings, options, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      res
    end
855035
def wait_until_available(resource):
  """'"""
  while True:
    resource.load()
    if resource.state == 'available':
      break
    time.sleep(RETRY_INTERVAL_SEC)
1331968
def set_data(self, index, value):
        """"""
        acces, field = self.get_item(index), self.header[index.column()]
        self.beginResetModel()
        self.set_data_hook(acces, field, value)
        self.endResetModel()
252173
def wait_until(predicate, timeout=30):
    
    not_expired = Timeout(timeout)
    while not_expired():
        r = predicate()
        if r:
            break
1040319
def db_set_indexing(cls, is_indexing, impl, working_dir):
        
        indexing_lockfile_path = config.get_lockfile_filename(impl, working_dir)
        if is_indexing:
            # make sure this exists
            with open(indexing_lockfile_path, 'w') as f:
                pass

        else:
            # make sure it does not exist 
            try:
                os.unlink(indexing_lockfile_path)
            except:
                pass
140734
public void set(long startIndex, long endIndex)
    {
        if (endIndex <= startIndex) return;

        int startWord = (int) (startIndex >> 6);

        // since endIndex is one past the end, this is index of the last
        // word to be changed.
        int endWord = expandingWordNum(endIndex - 1);

        long startmask = -1L << startIndex;
        long endmask = -1L >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex
                                          // due to wrap

        if (startWord == endWord)
        {
            bits[startWord] |= (startmask & endmask);
            return;
        }

        bits[startWord] |= startmask;
        Arrays.fill(bits, startWord + 1, endWord, -1L);
        bits[endWord] |= endmask;
    }
356465
public void setLastApplied(long index) {
    // Query callbacks for this session are added to the indexQueries map to be executed once the required index
    // for the query is reached. For each increment of the index, trigger query callbacks that are dependent
    // on the specific index.
    for (long i = lastApplied + 1; i <= index; i++) {
      lastApplied = i;
      List<Runnable> queries = this.indexQueries.remove(lastApplied);
      if (queries != null) {
        for (Runnable query : queries) {
          query.run();
        }
      }
    }
  }
964735
public void endInterval(int lastIndex) {
        if (isOpen) {
            currentDetail.setLast(lastIndex);
            pathDetails.add(currentDetail);
        }
        isOpen = false;
    }
436610
public void pauseOfflineIndexing() {

        if (m_offlineUpdateFrequency != Long.MAX_VALUE) {
            m_configuredOfflineIndexingFrequency = m_offlineUpdateFrequency;
            m_offlineUpdateFrequency = Long.MAX_VALUE;
            updateOfflineIndexes(0);
        }
    }
1106398
def setup_db(self, wait_for_ready=True):
        ''' 
        '''

        if self.es.indices.exists(self.index_name):
            try:
                self.update_mappings()
            except MappingsException as ex:
                log.error(ex)
                log.warn('An old or wrong properties mapping has been found for index: "{0}",\
                          this could led to some errors. It is recomanded to run "libreant-db upgrade"'.format(self.index_name))
        else:
            log.debug("Index is missing: '{0}'".format(self.index_name))
            self.create_index()

        if wait_for_ready:
            log.debug('waiting for index "{}" to be ready'.format(self.index_name))
            self.es.cluster.health(index=self.index_name, level='index', wait_for_status='yellow')
            log.debug('index "{}" is now ready'.format(self.index_name))
1003881
def get_settings(self, index):
        
        settings = self.es.indices.get_settings(index=index)
        return next(iter(settings.values()))
746210
public void waitForHealthyIndex(String index) throws IOException {
        logger.debug("wait for yellow health on index [{}]", index);
        ClusterHealthResponse health = client.cluster().health(new ClusterHealthRequest(index).waitForYellowStatus(),
                RequestOptions.DEFAULT);
        logger.trace("health response: {}", health);
    }
212718
def set(self, index, value=None, dir=False, ttl=None, expiration=None):
        """"""
        if bool(dir) is (value is not None):
            raise TypeError('Choose one of value or directory')
        if (ttl is not None) is (expiration is None):
            raise TypeError('Both of ttl and expiration required')
        self.value = value
        if self.dir != dir:
            self.dir = dir
            self.nodes = {} if dir else None
        self.ttl = ttl
        self.expiration = expiration
        self.modified_index = index
392002
public void setMaxIndexWaitTime(String maxIndexWaitTime) {

        try {
            setMaxIndexWaitTime(Long.parseLong(maxIndexWaitTime));
        } catch (Exception e) {
            LOG.error(
                Messages.get().getBundle().key(
                    Messages.LOG_PARSE_MAX_INDEX_WAITTIME_FAILED_2,
                    maxIndexWaitTime,
                    new Long(DEFAULT_MAX_INDEX_WAITTIME)),
                e);
            setMaxIndexWaitTime(DEFAULT_MAX_INDEX_WAITTIME);
        }
    }
423415
private function waitForAllToFinish(): void
    {
        do {
            foreach ($this->workers as $key => $worker) {
                if (!$worker->isRunning()) {
                    unset($this->workers[$key]);
                }
            }
            usleep(10000);
            $this->printOutput();
        } while (\count($this->workers) > 0);
    }
714383
private void waitIndexingNotSuspended() {
        boolean suspendedNotified = false;
        synchronized (suspendLock) {
            while (suspend > 0) {
                if (!suspendedNotified) {
                    suspendedNotified = true;
                }
                try {
                    suspendLock.wait();
                } catch (InterruptedException ex) {
                }
            }
        }
    }
566612
public void set(int index, long value) {
    assert index >= 0 : "index (" + index + ") should >= 0";
    assert index < length : "index (" + index + ") should < length (" + length + ")";
    Platform.putLong(baseObj, baseOffset + index * WIDTH, value);
  }