Get the snapshot of the configuration from the configuration manager.
Synchronized on config manager to ensure that config is atomically updated
per pool.
513712
private void snapshotConfig() {
    synchronized (configManager) {
      maximum = configManager.getPoolMaximum(poolInfo, getType());
      minimum = configManager.getPoolMinimum(poolInfo, getType());
      weight = configManager.getWeight(poolInfo);
      priority = configManager.getPriority(poolInfo);
      preemptable = configManager.isPoolPreemptable(poolInfo);
      shareStarvingRatio = configManager.getShareStarvingRatio();
      minPreemptPeriod = configManager.getMinPreemptPeriod();
      starvingTimeForShare = configManager.getStarvingTimeForShare();
      starvingTimeForMinimum = configManager.getStarvingTimeForMinimum();
    }
  }
160519
def snapshot(self):
        """"""
        self._snapshot = {
            'name': self.name,
            'volume': self.volume,
            'muted': self.muted,
            'latency': self.latency
        }
        _LOGGER.info('took snapshot of current state of %s', self.friendly_name)
341924
def snapshot(self) -> Tuple[Hash32, UUID]:
        
        return self.state_root, self._account_db.record()
418712
public void snapshot() {
    snapshotPoolGroups =
        new ArrayList<PoolGroupSchedulable>(nameToPoolGroup.values());
    for (PoolGroupSchedulable poolGroup : snapshotPoolGroups) {
      poolGroup.snapshot();
    }
    scheduleQueue = null;
    preemptQueue = null;

    // Load the configured pools for stats and cm.jsp
    // (needs to modify nameToPoolGroup)
    Collection<PoolInfo> configuredPoolInfos =
        configManager.getConfiguredPoolInfos();
    if (configuredPoolInfos != null) {
      for (PoolInfo poolInfo : configuredPoolInfos) {
        getPoolSchedulable(poolInfo);
      }
    }
  }
1254473
def update_configuration(self):
        
        uri = "{}/configuration".format(self.data["uri"])
        result = self._helper.update({}, uri)
        self.refresh()

        return result
1181760
def snapshot(self, lock=False):
        
        with db.session.begin_nested():
            bucket = Bucket(
                default_location=self.default_location,
                default_storage_class=self.default_storage_class,
                quota_size=self.quota_size,
            )
            db.session.add(bucket)

        for o in ObjectVersion.get_by_bucket(self):
            o.copy(bucket=bucket)

        bucket.locked = True if lock else self.locked

        return bucket
44674
private CompletableFuture<Snapshot> takeSnapshots() {
    ComposableFuture<Snapshot> future = new ComposableFuture<>();
    stateContext.execute(() -> {
      try {
        future.complete(snapshot());
      } catch (Exception e) {
        future.completeExceptionally(e);
      }
    });
    return future;
  }
1348009
def snapshot(self, mode):
        '''
        
        '''
        self._init_env()

        self._save_cfg_packages(self._get_changed_cfg_pkgs(self._get_cfg_pkgs()))
        self._save_payload(*self._scan_payload())
738306
def _getConfiguration(self):
        
        configDirectoryPath = os.path.join("application", "config")
        config = Config(configDirectoryPath)
        configData = config.getData()

        # setting application parameters
        reactor.suggestThreadPoolSize(
            int(configData["performance"]["threadPoolSize"])
        )

        return configData
370791
def _get_config():
    
    conf_file = os.path.join(_get_config_dir(), 'log_config.toml')
    if os.path.exists(conf_file):
        with open(conf_file) as fd:
            raw_config = fd.read()
        log_config = toml.loads(raw_config)
        return log_config

    conf_file = os.path.join(_get_config_dir(), 'log_config.yaml')
    if os.path.exists(conf_file):
        with open(conf_file) as fd:
            raw_config = fd.read()
        log_config = yaml.safe_load(raw_config)
        return log_config

    return None
943619
def _get_snapshot(vm, snapshot_name):
        
        snapshots = SnapshotRetriever.get_vm_snapshots(vm)

        if snapshot_name not in snapshots:
            raise SnapshotNotFoundException('Snapshot {0} was not found'.format(snapshot_name))

        return snapshots[snapshot_name]
299409
def _snapshot(self) -> Dict[str, Any]:
        
        try:
            return {name: item._snapshot for name, item in self._nested_items.items()}
        except Exception as e:
            raise SnapshotError('Error while creating snapshot for {}'.format(self._name)) from e
122323
public static Snapshot getSnapshot(ExecutorService service) {
        Preconditions.checkNotNull(service, "service");
        if (service instanceof ThreadPoolExecutor) {
            val tpe = (ThreadPoolExecutor) service;
            return new Snapshot(tpe.getQueue().size(), tpe.getActiveCount(), tpe.getPoolSize());
        } else if (service instanceof ForkJoinPool) {
            val fjp = (ForkJoinPool) service;
            return new Snapshot(fjp.getQueuedSubmissionCount(), fjp.getActiveThreadCount(), fjp.getPoolSize());
        } else {
            return null;
        }
    }
507202
def configurations(self):
        
        if self._configuration_manager is None:
            self._configuration_manager = ConfigurationManager(session=self._session)
        return self._configuration_manager
71636
def sync_it_now
      puts "Attempt Sync"

      # Getting the last sync value.
      last_update_at = get_last_update_at

      # querying the page.
      page = @mechanize_agent.get("#{ChronuscopClient.configuration_object.chronuscop_server_address}/projects/#{ChronuscopClient.configuration_object.project_number}/translations.xml/?auth_token=#{ChronuscopClient.configuration_object.api_token}&last_update_at=#{last_update_at}")

      # converting the returned xml page into a hash.
      words_hash = XmlSimple.xml_in(page.body)

      # catching the case when no-translations are returned.
      if(!words_hash) then
        puts "Nothing new added."
        return
      end

      # collecting the translations array.
      all_translations = words_hash["translation"]

      # catching the case when no-translations are returned.
      if(!all_translations) then
        puts "Nothing new added."
        return
      end


      all_translations.each do |t|
        # Inserting into the redis store.
        @redis_agent.set "#{t["key"]}","#{t["value"]}"

        # Bad hack used here. Should fix this.
        str = t["updated-at"][0]["content"]
        key_updated_at = xml_time_to_integer(str)

        # Updating the value last_update_at
        if(key_updated_at > last_update_at) then
          last_update_at = key_updated_at
        end

      end

      # Writing the value of last_update_at to the file.
      write_last_update(last_update_at.to_i)
      puts "Finished synchronizing !!!"
    end
505023
def snapshot(self):
        """"""
        data_item = self.__class__()
        # data format (temporary until moved to buffered data source)
        data_item.large_format = self.large_format
        data_item.set_data_and_metadata(copy.deepcopy(self.data_and_metadata), self.data_modified)
        # metadata
        data_item.created = self.created
        data_item.timezone = self.timezone
        data_item.timezone_offset = self.timezone_offset
        data_item.metadata = self.metadata
        data_item.title = self.title
        data_item.caption = self.caption
        data_item.description = self.description
        data_item.session_id = self.session_id
        data_item.session_data = copy.deepcopy(self.session_data)
        return data_item
711952
Snapshot snapshot() {
    Snapshot snapshot = raft.getSnapshotStore().newTemporarySnapshot(raft.getLastApplied(), new WallClockTimestamp());
    try (SnapshotWriter writer = snapshot.openWriter()) {
      for (RaftServiceContext service : raft.getServices()) {
        writer.buffer().mark();
        SnapshotWriter serviceWriter = new SnapshotWriter(writer.buffer().writeInt(0).slice(), writer.snapshot());
        snapshotService(serviceWriter, service);
        int length = serviceWriter.buffer().position();
        writer.buffer().reset().writeInt(length).skip(length);
      }
    } catch (Exception e) {
      snapshot.close();
      logger.error("Failed to snapshot services", e);
      throw e;
    }
    return snapshot;
  }