Finds all the snapshots in all the places we know of which could possibly
store snapshots, like command log snapshots, auto snapshots, etc.

@return All snapshots
858
private Map<String, Snapshot> getSnapshots() {
        /*
         * Use the individual snapshot directories instead of voltroot, because
         * they can be set individually
         */
        Map<String, SnapshotPathType> paths = new HashMap<String, SnapshotPathType>();
        if (VoltDB.instance().getConfig().m_isEnterprise) {
            if (m_clSnapshotPath != null) {
                paths.put(m_clSnapshotPath, SnapshotPathType.SNAP_CL);
            }
        }
        if (m_snapshotPath != null) {
            paths.put(m_snapshotPath, SnapshotPathType.SNAP_AUTO);
        }
        HashMap<String, Snapshot> snapshots = new HashMap<String, Snapshot>();
        FileFilter filter = new SnapshotUtil.SnapshotFilter();

        for (String path : paths.keySet()) {
            SnapshotUtil.retrieveSnapshotFiles(new File(path), snapshots, filter, false, paths.get(path), LOG);
        }

        return snapshots;
    }
78054
public Snapshot getCurrentSnapshot() {
    Map.Entry<Long, Snapshot> entry = snapshots.lastEntry();
    return entry != null ? entry.getValue() : null;
  }
84457
public Map<String,Map<String,String>> getAllThreadDumps() throws IOException, InterruptedException {
        checkPermission(ADMINISTER);

        // issue the requests all at once
        Map<String,Future<Map<String,String>>> future = new HashMap<>();

        for (Computer c : getComputers()) {
            try {
                future.put(c.getName(), RemotingDiagnostics.getThreadDumpAsync(c.getChannel()));
            } catch(Exception e) {
                LOGGER.info("Failed to get thread dump for node " + c.getName() + ": " + e.getMessage());
            }
        }
        if (toComputer() == null) {
            future.put("master", RemotingDiagnostics.getThreadDumpAsync(FilePath.localChannel));
        }

        // if the result isn't available in 5 sec, ignore that.
        // this is a precaution against hang nodes
        long endTime = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(5);

        Map<String,Map<String,String>> r = new HashMap<>();
        for (Entry<String, Future<Map<String, String>>> e : future.entrySet()) {
            try {
                r.put(e.getKey(), e.getValue().get(endTime-System.currentTimeMillis(), TimeUnit.MILLISECONDS));
            } catch (Exception x) {
                r.put(e.getKey(), Collections.singletonMap("Failed to retrieve thread dump", Functions.printThrowable(x)));
            }
        }
        return Collections.unmodifiableSortedMap(new TreeMap<>(r));
    }
152043
public List<File> getAllFiles() {
		List<File> files = new ArrayList<File>();
		collectFiles(folder, files);
		Collections.sort(files, LastModifiedFileComparator.INSTANCE);
		return files;
	}
771531
public java.util.List<String> getResults() {
        if (results == null) {
            results = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return results;
    }
1151672
public java.util.List<Datapoint> getDatapoints() {
        if (datapoints == null) {
            datapoints = new com.amazonaws.internal.SdkInternalList<Datapoint>();
        }
        return datapoints;
    }
523346
public java.util.List<DBClusterSnapshot> getDBClusterSnapshots() {
        if (dBClusterSnapshots == null) {
            dBClusterSnapshots = new com.amazonaws.internal.SdkInternalList<DBClusterSnapshot>();
        }
        return dBClusterSnapshots;
    }
258469
public java.util.List<SearchedLogStream> getSearchedLogStreams() {
        if (searchedLogStreams == null) {
            searchedLogStreams = new com.amazonaws.internal.SdkInternalList<SearchedLogStream>();
        }
        return searchedLogStreams;
    }
8966
public java.util.List<Tape> getTapes() {
        if (tapes == null) {
            tapes = new com.amazonaws.internal.SdkInternalList<Tape>();
        }
        return tapes;
    }
613937
protected synchronized void snapshotAll() {
        snapshotsManager.getAll().forEach(s -> {
            RepositorySnapshotter.SnapshotIdentifier id = s.prepare();
            s.snapshot(repository.getData(), id);
            s.commit(journalsStorage.getLastStoreVersion(), id);
        });
    }
134306
def get_snapshots(self):
        
        ec2 = self.get_ec2_connection()
        rs = ec2.get_all_snapshots()
        all_vols = [self.volume_id] + self.past_volume_ids
        snaps = []
        for snapshot in rs:
            if snapshot.volume_id in all_vols:
                if snapshot.progress == '100%':
                    snapshot.date = boto.utils.parse_ts(snapshot.start_time)
                    snapshot.keep = True
                    snaps.append(snapshot)
        snaps.sort(cmp=lambda x,y: cmp(x.date, y.date))
        return snaps
629188
def list_snapshots(config='root'):
    '''
    
    '''
    try:
        snapshots = snapper.ListSnapshots(config)
        return [_snapshot_to_data(s) for s in snapshots]
    except dbus.DBusException as exc:
        raise CommandExecutionError(
            'Error encountered while listing snapshots: {0}'
            .format(_dbus_exception_to_reason(exc, locals()))
        )
906421
def snapshots(self):
        
        self.connection._check_login()
        response = self.connection._do_get("{}/{}".format(self.connection._api_url, "types/Volume/instances")).json()
        all_volumes_snapshot = []
        for volume in response:
            if volume['volumeType'] == 'Snapshot':
                all_volumes_snapshot.append(
                    Volume.from_dict(volume)
            )
        return all_volumes_snapshot
229294
private List<Path> getLocalLogDirs() throws IOException {
    String logDirs = System.getenv(ApplicationConstants.Environment.LOG_DIRS.toString());
    return COMMA_SPLITTER.splitToList(logDirs).stream().map(e -> new Path(e)).collect(Collectors.toList());
  }
771776
public java.util.List<Resource> getResources() {
        if (resources == null) {
            resources = new com.amazonaws.internal.SdkInternalList<Resource>();
        }
        return resources;
    }
1187283
public Map<String, Object> getAllProperties() {
        Map<String, Object> map = new HashMap<>();

        Arrays
            .stream(catalog)
            .filter(Objects::nonNull)
            .map(Map::entrySet)
            .flatMap(Collection::stream)
            .forEach((Map.Entry<String, Object> entry) -> {
                String k = entry.getKey();
                Object value = resolvePlaceHoldersIfNecessary(entry.getValue());
                Map finalMap = map;
                int index = k.indexOf('.');
                if (index != -1) {
                    String[] keys = k.split("\\.");
                    for (int i = 0; i < keys.length - 1; i++) {
                        if (!finalMap.containsKey(keys[i])) {
                            finalMap.put(keys[i], new HashMap<>());
                        }
                        Object next = finalMap.get(keys[i]);
                        if (next instanceof Map) {
                            finalMap = ((Map) next);
                        }
                    }
                    finalMap.put(keys[keys.length - 1], value);
                } else {
                    finalMap.put(k, value);
                }
            });

        return map;
    }
307231
@Override
    public Iterable<Path> getRootDirectories() {

        this.checkClosed();

        // Each ShrinkWrapFileSystem has one root directory
        final Path path = new ShrinkWrapPath(ArchivePaths.root(), this);
        final List<Path> paths = new ArrayList<>(1);
        paths.add(path);
        return Collections.unmodifiableList(paths);
    }