Set the flush interval.

    Args:
      flush_interval (int): number of events to buffer before doing a bulk
          insert.
17405
def SetFlushInterval(self, flush_interval):
    
    self._flush_interval = flush_interval
    logger.debug('Elasticsearch flush interval: {0:d}'.format(flush_interval))
168763
def flush_at(next_flush, base = nil)
    @cache.each do |key, entry|
      next if base and not base === key
      entry.expire_at(next_flush)
    end
  end
765146
def with_flush_immediately(self, flush_immediately: Optional[bool]=True)\
            -> 'BaseTensorBoardTask':
        
        self._flush_immediately = flush_immediately
        return self
1011655
def _batch_insert(self, inserts, intervals, **kwargs):
    '''
    
    '''
    if 'pipeline' in kwargs:
      pipe = kwargs.get('pipeline')
      own_pipe = False
    else:
      pipe = self._client.pipeline(transaction=False)
      kwargs['pipeline'] = pipe
      own_pipe = True

    ttl_batch = set()
    for timestamp,names in inserts.iteritems():
      for name,values in names.iteritems():
        for value in values:
          # TODO: support config param to flush the pipe every X inserts
          self._insert( name, value, timestamp, intervals, ttl_batch=ttl_batch, **kwargs )

    for ttl_args in ttl_batch:
      pipe.expire(*ttl_args)

    if own_pipe:
      kwargs['pipeline'].execute()
500003
function flushQueueIfAvailable()
    {
        if (!isLogAvailable())
            return;

        clearInterval(WebInspector.log.interval);
        delete WebInspector.log.interval;

        flushQueue();
    }
1118293
def set_keepalive(self, interval, callback):
        
        self.__keepalive_interval = interval
        self.__keepalive_callback = callback
        self.__keepalive_last = time.time()
802142
def flush(self):
        
        self.logger.debug('Flush joining')
        self.queue.join()
        self.logger.debug('Flush joining ready')
951197
def _flush(self):
        
        # Flush buffer to specified range
        buffer = self._get_buffer()
        start = self._buffer_size * (self._seek - 1)
        end = start + len(buffer)

        future = self._workers.submit(
            self._flush_range, buffer=buffer, start=start, end=end)
        self._write_futures.append(future)
        future.add_done_callback(partial(self._update_size, end))
818254
def set_sampling_interval(self, interval):
        
        task = asyncio.ensure_future(self.core.set_sampling_interval(interval))
        self.loop.run_until_complete(task)
1180842
def __flush(self):
        
        def on_md5(md5):
            self._file["md5"] = md5
            self._file["length"] = self._position
            self._file["uploadDate"] = datetime.datetime.utcnow()
            return self._coll.files.insert(self._file)

        return self.__flush_buffer()\
            .addCallback(lambda _: self._coll.filemd5(self._id))\
            .addCallback(on_md5)
84535
def flush(self):
        
        n = self.accumulator
        self.accumulator = 0

        stream = self.stream
        stream.append(n)
        self.sum += n

        streamlen = len(stream)

        if streamlen > self.period:
            self.sum -= stream.popleft()
            streamlen -= 1

        if streamlen == 0:
            self.last_average = 0
        else:
            self.last_average = self.sum / streamlen
568859
def flush(self):
        
        local_sender = self.sender
        if not local_sender:
            return
        while True:
            # get at most send_buffer_size items and send them
            data = []
            while len(data) < local_sender.send_buffer_size:
                item = self.get()
                if not item:
                    break
                data.append(item)
            if len(data) == 0:
                break
            local_sender.send(data)
1348386
def change_interval(self, value):
        
        assert not isinstance(value, string_types)
        self.timestamps = []

        for timestamp in value:
            event = EventTime(timestamp)
            self.timestamps.append(event)
987308
def _FlushInput(self):
        
        self.ser.flush()
        flushed = 0
        while True:
            ready_r, ready_w, ready_x = select.select([self.ser], [],
                                                      [self.ser], 0)
            if len(ready_x) > 0:
                logging.error("Exception from serial port.")
                return None
            elif len(ready_r) > 0:
                flushed += 1
                self.ser.read(1)  # This may cause underlying buffering.
                self.ser.flush()  # Flush the underlying buffer too.
            else:
                break
1221959
def _batch_insert(self, inserts, intervals, **kwargs):
    '''
    
    '''
    updates = {}
    # TODO support flush interval
    for interval,config in self._intervals.items():
      for timestamp,names in inserts.iteritems():
        timestamps = self._normalize_timestamps(timestamp, intervals, config)
        for name,values in names.iteritems():
          for value in values:
            for tstamp in timestamps:
              query,insert = self._insert_data(
                name, value, tstamp, interval, config, dry_run=True)

              batch_key = self._batch_key(query)
              updates.setdefault(batch_key, {'query':query, 'interval':interval})
              new_insert = self._batch(insert, updates[batch_key].get('insert'))
              updates[batch_key]['insert'] = new_insert

    # now that we've collected a bunch of updates, flush them out
    for spec in updates.values():
      self._client[ spec['interval'] ].update(
        spec['query'], spec['insert'], upsert=True, check_keys=False )
65162
def __flush(self):
        
        try:
            self.__flush_buffer()

            self._file['md5'] = self._file["md5"].hexdigest()
            self._file["length"] = self._position
            self._file["uploadDate"] = datetime.datetime.utcnow()

            return self._coll.files.insert_one(self._file)
        except DuplicateKeyError:
            self._raise_file_exists(self._id)
625932
public void setDashedLinePram(double length, double interval) {
        this.dashedLineLength = length;
        this.dashedLineInterval = interval;
        this.dashed = true;
        calcDashedLine();
    }