Get a snapshot of the pool infos that is sorted.

@return Sorted snapshot of the pool infos.
3824
public List<PoolInfo> getPoolInfos() {
    Set<PoolInfo> poolInfos = new HashSet<PoolInfo>();
    for (ResourceType type : types) {
      poolInfos.addAll(getPoolInfoMetrics(type).keySet());
    }
    List<PoolInfo> result = new ArrayList<PoolInfo>();
    result.addAll(poolInfos);
    Collections.sort(result);
    return result;
  }
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);
      }
    }
  }
607362
public synchronized ExecutorService getBatchThreadPool() {
    if (batchThreadPool == null) {
      batchThreadPool = Executors
          .newCachedThreadPool(ThreadUtil.getThreadFactory(BATCH_POOL_THREAD_NAME_PATTERN, true));
    }
    return batchThreadPool;
  }
406396
@Nullable
  private List<LookupBean> getLookupListFromSnapshot()
  {
    if (lookupSnapshotTaker != null) {
      return lookupSnapshotTaker.pullExistingSnapshot(lookupListeningAnnouncerConfig.getLookupTier());
    }
    return null;
  }
968389
protected LinkedHashMap<String, String> getSortList() {

        LinkedHashMap<String, String> list = new LinkedHashMap<String, String>();
        list.put(SortParams.tree.name(), Messages.get().key(Messages.GUI_SORT_LABEL_HIERARCHIC_0));
        list.put(SortParams.title_asc.name(), Messages.get().key(Messages.GUI_SORT_LABEL_TITLE_ASC_0));
        list.put(SortParams.title_desc.name(), Messages.get().key(Messages.GUI_SORT_LABEL_TITLE_DECS_0));
        list.put(SortParams.path_asc.name(), Messages.get().key(Messages.GUI_SORT_LABEL_PATH_ASC_0));
        list.put(SortParams.path_desc.name(), Messages.get().key(Messages.GUI_SORT_LABEL_PATH_DESC_0));

        return list;
    }
351295
public static PoolParams get() {
    // This pool supports only one bucket size: DEFAULT_IO_BUFFER_SIZE
    SparseIntArray defaultBuckets = new SparseIntArray();
    defaultBuckets.put(DEFAULT_IO_BUFFER_SIZE, DEFAULT_BUCKET_SIZE);
    return new PoolParams(
        MAX_SIZE_SOFT_CAP,
        MAX_SIZE_HARD_CAP,
        defaultBuckets);
  }
304243
public CompletableFuture<Void> snapshot() {
    RaftPartitionServer server = this.server;
    if (server != null) {
      return server.snapshot();
    }
    return CompletableFuture.completedFuture(null);
  }
1360635
public java.lang.String getSnapshotName() {
    java.lang.Object ref = snapshotName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      snapshotName_ = s;
      return s;
    }
  }
34930
public final List<DataSlice> getPersistentData()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getPersistentData");

    ByteArrayOutputStream bos = new ByteArrayOutputStream();

    try
    {
      ObjectOutputStream oos = new ObjectOutputStream(bos);

      // First object stored should always be the version integer.
      oos.writeInt(getPersistentVersion());

      getPersistentData(oos);

      oos.close();
    }
    catch (Exception e)
    {
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.impl.store.itemstreams.SIMPItemStream.getPersistentData",
        "1:297:1.54",
        this);

      SibTr.exception(tc, e);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "getPersistentData", e);

      throw new SIErrorException(e);
    }

    byte[] data = bos.toByteArray();

    List<DataSlice> dataSlices = new ArrayList<DataSlice>(1);
    dataSlices.add(new DataSlice(data));

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getPersistentData", dataSlices);

    return dataSlices;
  }
1372400
public java.util.List<DBSnapshotAttribute> getDBSnapshotAttributes() {
        if (dBSnapshotAttributes == null) {
            dBSnapshotAttributes = new com.amazonaws.internal.SdkInternalList<DBSnapshotAttribute>();
        }
        return dBSnapshotAttributes;
    }
44674
private CompletableFuture<Snapshot> takeSnapshots() {
    ComposableFuture<Snapshot> future = new ComposableFuture<>();
    stateContext.execute(() -> {
      try {
        future.complete(snapshot());
      } catch (Exception e) {
        future.completeExceptionally(e);
      }
    });
    return future;
  }
59597
public static ForkJoinPool getPool() {
        Thread t = Thread.currentThread();
        return (t instanceof ForkJoinWorkerThread) ?
            ((ForkJoinWorkerThread) t).pool : null;
    }
122041
public CpuAcctMetric snapshot()
  {
    final File cpuacct;
    try {
      cpuacct = new File(
          cgroupDiscoverer.discover(CGROUP).toFile(),
          CGROUP_ACCT_FILE
      );
    }
    catch (RuntimeException re) {
      LOG.error(re, "Unable to fetch snapshot");
      return new CpuAcctMetric(new long[0], new long[0]);
    }
    try {
      return parse(Files.readAllLines(cpuacct.toPath(), StandardCharsets.UTF_8));
    }
    catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
78325
public Map<String, IndexInformation> getIndexInformation() {
        ImmutableMap.Builder<String, IndexInformation> copy = ImmutableMap.builder();
        copy.putAll(indexes);
        return copy.build();
    }
322703
public ArrayList<ProgressSource> getProgressSources()    {
        ArrayList<ProgressSource> snapshot = new ArrayList<ProgressSource>();

        try {
            synchronized(progressSourceList)    {
                for (Iterator<ProgressSource> iter = progressSourceList.iterator(); iter.hasNext();)    {
                    ProgressSource pi = iter.next();

                    // Clone ProgressSource and add to snapshot
                    snapshot.add((ProgressSource)pi.clone());
                }
            }
        }
        catch(CloneNotSupportedException e) {
            e.printStackTrace();
        }

        return snapshot;
    }
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();
    }
  }
1013047
@Override
  public String[] listSnapshots() throws IOException {
    Path ssPath = new Path(ssDir);

    if (!dfs.exists(ssPath)) {
      throw new FileNotFoundException("Snapshot dir doesn't exist");
    }

    FileStatus ssStatus = dfs.getFileStatus(ssPath);
      if (!ssStatus.isDir()) {
        throw new IOException("ssDir " + ssDir  +" is not a directory");
      }

    FileStatus[] files = dfs.listStatus(ssPath);
    List<String> ssIds = new ArrayList<String>();

    // Separate snapshot files
    for (FileStatus ss: files) {
      if (ss.isDir()) continue; // skips dirs
      String name = ss.getPath().getName();
      if (!name.startsWith("dfs_snapshot_")) continue;
      ssIds.add(name.substring(13));
    }

    String[] rtn = new String[ssIds.size()];
    for (int i = 0; i < ssIds.size(); i++) {
      rtn[i] = ssIds.get(i);
    }

    return rtn;
  }