public final class PathAndQuery extends Object
| Modifier and Type | Method and Description |
|---|---|
static Set<String> |
cachedPaths()
Returns paths that have had their parse result cached.
|
static void |
clearCachedPaths()
Clears the currently cached parsed paths.
|
boolean |
equals(Object o) |
int |
hashCode() |
static PathAndQuery |
parse(String rawPath)
Validates the
String that contains an absolute path and a query, and splits them into
the path part and the query part. |
String |
path() |
String |
query() |
static void |
registerMetrics(MeterRegistry registry,
MeterIdPrefix idPrefix) |
void |
storeInCache(String rawPath)
Stores this
PathAndQuery into cache for the given raw path. |
String |
toString() |
public static void registerMetrics(MeterRegistry registry, MeterIdPrefix idPrefix)
public static void clearCachedPaths()
public static Set<String> cachedPaths()
public static PathAndQuery parse(String rawPath)
String that contains an absolute path and a query, and splits them into
the path part and the query part. If the path is usable (e.g., can be served a successful response from
the server and doesn't have variable path parameters), storeInCache(String) should
be called to cache the parsing result for faster future invocations.PathAndQuery with the absolute path and query, or null if the specified
String is not an absolute path or invalid.public void storeInCache(String rawPath)
PathAndQuery into cache for the given raw path. This should be used by callers when
the parsed result was valid (e.g., when a server is able to successfully handle the parsed path).public String path()
public String query()
Copyright © 2020 LeanCloud. All rights reserved.