public class CachingCesiumUriResolver extends Object implements ICesiumUriResolver
Constructor and Description |
---|
CachingCesiumUriResolver(int max)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addUri(String sourceUri,
String resolvedUri)
Add a URI to the cache for future calls to
CachingCesiumUriResolver.resolveUri(java.lang.String) . |
boolean |
containsUri(String sourceUri)
Checks whether the cache already contains a resolved URI for the given URI.
|
static CachingCesiumUriResolver |
getThreadLocalInstance()
Gets an instance of
CachingCesiumUriResolver local to the calling thread. |
String |
resolveUri(String uri)
Resolves a URI, producing a new URI for inclusion in a CZML document.
|
public CachingCesiumUriResolver(int max)
max
- The maximum number of remote files to cache before removing the oldest.public final String resolveUri(String uri)
resolveUri
in interface ICesiumUriResolver
uri
- The source URI.public final void addUri(@Nonnull String sourceUri, @Nonnull String resolvedUri)
CachingCesiumUriResolver.resolveUri(java.lang.String)
.sourceUri
- The source URI.resolvedUri
- The resolved URI.public final boolean containsUri(@Nonnull String sourceUri)
sourceUri
- The source URI.@Nonnull public static CachingCesiumUriResolver getThreadLocalInstance()
CachingCesiumUriResolver
local to the calling thread.