public final class SnapshotLocation extends Object
A location is either a local path or a URI. A URI can carry a password, so toString() masks it.
Printing a location is therefore safe by default. raw() marks the places that need the password
itself.
| Constructor and Description |
|---|
SnapshotLocation(String location) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isSftp() |
static @Nullable SnapshotLocation |
of(@Nullable String location) |
static @Nullable List<SnapshotLocation> |
ofAll(@Nullable Collection<String> locations) |
String |
raw()
Returns the location including any password it carries.
|
static @Nullable List<String> |
rawAll(@Nullable Collection<SnapshotLocation> locations) |
static @Nullable String |
rawOf(@Nullable SnapshotLocation location) |
Path |
toPath() |
String |
toString() |
URI |
toUri() |
public SnapshotLocation(String location)
location - Location as it was configured. Must not be null.@Nullable public static @Nullable SnapshotLocation of(@Nullable @Nullable String location)
location - Location as it was configured, possibly null.null if location is null.public String raw()
Only code that opens the repository needs this. Anything that shows a location to a human must use
toString() instead.
@Nullable public static @Nullable List<SnapshotLocation> ofAll(@Nullable @Nullable Collection<String> locations)
locations - Locations as they were configured, possibly null.null if locations is null.@Nullable public static @Nullable String rawOf(@Nullable @Nullable SnapshotLocation location)
location - Location, possibly null.raw(), or null if location is null.@Nullable public static @Nullable List<String> rawAll(@Nullable @Nullable Collection<SnapshotLocation> locations)
locations - Locations, possibly null.raw(), or null if locations is null.public boolean isSftp()
True if this is an SFTP location.public URI toUri() throws URISyntaxException
URISyntaxException - If the location is not a valid URI.public Path toPath()
GridGain In-Memory Computing Platform : ver. 8.9.37 Release Date : August 25 2026