Configures refresh after write.
764558
void refreshAfterWrite(String key, @Nullable String value) {
    requireArgument(refreshAfterWriteDuration == UNSET_INT, "refreshAfterWrite was already set");
    refreshAfterWriteDuration = parseDuration(key, value);
    refreshAfterWriteTimeUnit = parseTimeUnit(key, value);
  }
877401
private synchronized void refreshCachedData() throws IOException {
    IOUtils.closeStream(committedTxnId);
    
    File currentDir = journalStorage.getSingularStorageDir().getCurrentDir();
    this.lastPromisedEpoch = new PersistentLongFile(
        new File(currentDir, LAST_PROMISED_FILENAME), 0);
    this.lastWriterEpoch = new PersistentLongFile(
        new File(currentDir, LAST_WRITER_EPOCH), 0);
    this.committedTxnId = new BestEffortLongFile(
        new File(currentDir, COMMITTED_TXID_FILENAME),
        HdfsConstants.INVALID_TXID);
    metrics.lastWriterEpoch.set(lastWriterEpoch.get());
  }
773707
def refresh(self):
        """"""
        logger.debug('Refresh panels')
        self.resize()
        self._update(self.editor.contentsRect(), 0,
                     force_update_margins=True)
296054
def enable_writes(self):
        """"""
        self.write_buffer = []
        self.flush_lock = threading.RLock()
        self.flush_thread = FlushThread(self.max_batch_time,
                                        self._flush_writes)
224793
public void refresh() {
    File configFile = new File(CONFIG_FILE_PATH);

    if (!configFile.exists()) {
      BufferedWriter writer = null;
      BufferedReader reader = null;
      try {
        configFile.createNewFile();
        InputStream in = Chemistry.class.getResourceAsStream("/org/helm/notation2/resources/MonomerStoreConfig.properties");
        reader = new BufferedReader(new InputStreamReader(in));

        writer = new BufferedWriter(new FileWriter(configFile));
        String line;
        while ((line = reader.readLine()) != null) {
          writer.write(line + System.getProperty("line.separator"));
        }

      } catch (Exception e) {
        resetConfigToDefault();
        e.printStackTrace();

      } finally {
        try {
          if (writer != null) {
            writer.close();
          }
          if (reader != null) {
            reader.close();
          }
        } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
      }
    }

    try

    {
      PropertiesConfiguration conf = new PropertiesConfiguration(CONFIG_FILE_PATH);
      isUseWebservice = conf.getBoolean(USE_WEBSERVICE);
      isUpdateAutomatic = conf.getBoolean(UPDATE_AUTOMATIC);
      webserviceMonomersURL = conf.getString(WEBSERVICE_MONOMERS_URL);
      webserviceMonomersPath = conf.getString(WEBSERVICE_MONOMERS_PATH);
      webserviceMonomersPutPath = conf.getString(WEBSERVICE_MONOMERS_PUT_PATH);
      webserviceNucleotidesURL = conf.getString(WEBSERVICE_NUCLEOTIDES_URL);
      webserviceNucleotidesPath = conf.getString(WEBSERVICE_NUCLEOTIDES_PATH);
      webserviceNucleotidesPutPath = conf.getString(WEBSERVICE_NUCLEOTIDES_PUT_PATH);
      webserviceEditorCategorizationURL = conf.getString(WEBSERVICE_EDITOR_CATEGORIZATION_URL);
      webserviceEditorCategorizationPath = conf.getString(WEBSERVICE_EDITOR_CATEGORIZATION_PATH);
 
      /* load from external xml file */
      isUseExternalMonomers = conf.getBoolean(USE_EXTERNAL_MONOMERS);
      externalMonomersPath = conf.getString(EXTERNAL_MONOMERS_PATH);
      isUseExternalNucleotides = conf.getBoolean(USE_EXTERNAL_NUCLEOTIDES);
      externalNucleotidesPath = conf.getString(EXTERNAL_NUCLEOTIDES_PATH);
      isUseExternalAttachments = conf.getBoolean(USE_EXTERNAL_ATTACHMENTS);
      externalAttachmentsPath = conf.getString(EXTERNAL_ATTACHMENTS_PATH);

    } catch (ConfigurationException | NoSuchElementException e) {
      resetConfigToDefault();
      e.printStackTrace();
    }

  }
1199346
def _sync_writes(self):
        '''
        
        '''
        for key in self._wqueue:
            val = self._cache[key]
            self._database[key] = val
        del self._wqueue
        self._wqueue = set()
        self._database.sync()
113569
def refresh(self, **kwargs):
        """"""
        self.resource.refresh(**kwargs)
        self.rdict = self.resource.entries
        self._update_stats()
1050096
private void mkRefreshConfThread(final NimbusData nimbusData) {
        nimbusData.getScheduExec().scheduleAtFixedRate(new RunnableCallback() {
            @Override
            public void run() {
                LOG.debug("checking changes in storm.yaml...");

                Map newConf = Utils.readStormConfig();
                if (Utils.isConfigChanged(nimbusData.getConf(), newConf)) {
                    LOG.warn("detected changes in storm.yaml, updating...");
                    synchronized (nimbusData.getConf()) {
                        nimbusData.getConf().clear();
                        nimbusData.getConf().putAll(newConf);
                    }

                    RefreshableComponents.refresh(newConf);
                } else {
                    LOG.debug("no changes detected, stay put.");
                }
            }

            @Override
            public Object getResult() {
                return 15;
            }
        }, 15, 15, TimeUnit.SECONDS);

        LOG.info("Successfully init configuration refresh thread");
    }
944435
public void refresh() throws IOException
    {
        if (Files.exists(file))
        {
            fine("%s exist", file);
            writeLock.lock();
            try
            {
                finer("start update(%s)", file);
                update(file);
                finer("end update(%s)", file);
            }
            finally
            {
                writeLock.unlock();
            }
            FileTime lmt = Files.getLastModifiedTime(file);
            if (thread == null && lmt.toMillis()+expires < System.currentTimeMillis())
            {
                thread = new Thread(this, url.toString());
                thread.setDaemon(true);
                thread.start();
                fine("started thread for %s", url);
            }
        }
        else
        {
            fine("%s doesn't exist", file);
            run();
        }
    }
127217
function onWritten(writeErr) {
      var flags = fo.getFlags({
        overwrite: optResolver.resolve('overwrite', file),
        append: optResolver.resolve('append', file),
      });
      if (fo.isFatalOverwriteError(writeErr, flags)) {
        return callback(writeErr);
      }

      callback(null, file);
    }
75042
public function onAfterWrite()
    {
        parent::onAfterWrite();

        if ($this->Default) {
            foreach ($this->Contact()->Locations() as $location) {
                if ($location->ID != $this->ID && $location->Default) {
                    $location->Default = false;
                    $location->write();
                }
            }
        }
    }
1257245
private void enableRefresh() {
        this.refreshButton.setEnabled(true);
        this.autoRefreshLabel.setEnabled(true);
        this.autoRefreshComboBox.setEnabled(true);
        updateAutoRefreshTimer();
    }
141500
def do_refresh(self,args):
        """"""
        pprint(AwsConnectionFactory.getEc2Client().describe_network_interfaces(NetworkInterfaceIds=[self.physicalId]));
956704
async def refresh(self):
        """"""
        raw_data = await self.request.get(self._resource_path, {"refresh": "true"})

        self._raw_data = raw_data[ATTR_SHADE]
155347
def refresh(self):
        # type: () -> None
        """"""
        src = self._client.reload(self)
        self.__dict__.update(src.__dict__)
559325
public function refresh()
    {
        $this->removeCache();
        $event = $this->eventManager->dispatch('refresh_cache', 'RefreshCache');
        $this->writeCache($event->getParameters());
    }
1136026
def refresh(self):
        """"""
        self._request_token(
            grant_type="password",
            username=self._username,
            password=self._password,
        )