io.nosqlbench.nb.addins.s3.s3urlhandler.S3UrlStreamHandlerProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nb-api Show documentation
Show all versions of nb-api Show documentation
The top level API module for NoSQLBench. This module should have no internal
module dependencies other than the mvn-default module.
All modules within NoSQLBench can safely depend on this module with circular
dependencies. This module provides cross-cutting code infrastracture, such as
path utilities and ways of describing services used between modules.
It is also the transitive aggregation point for system-wide library dependencies
for logging and testing or similar needs.
package io.nosqlbench.nb.addins.s3.s3urlhandler;
import io.nosqlbench.nb.annotations.Service;
import java.net.URLStreamHandler;
import java.net.spi.URLStreamHandlerProvider;
@Service(value = URLStreamHandlerProvider.class, selector = "s3")
public class S3UrlStreamHandlerProvider extends URLStreamHandlerProvider {
private final S3ClientCache clientCache = new S3ClientCache();
@Override
public URLStreamHandler createURLStreamHandler(String protocol) {
if ("s3".equals(protocol)) {
return new S3UrlStreamHandler(clientCache, protocol);
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy