This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ClientConfiguration getClientConfigueration() { | |
Assert.notNull(proxy, "Proxy address not found!"); | |
String host; | |
int port; | |
try { | |
URI uri = new URI(proxy); | |
host = uri.getHost(); | |
port = uri.getPort(); | |
} catch (URISyntaxException e) { | |
logger.error("Error creating client", e); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ClientConfiguration getClientConfigueration() { | |
Assert.notNull(proxy, "Proxy address not found!"); | |
return Try.of(() -> new URI(proxy)) | |
.map(uri -> new ClientConfiguration() | |
.withProxyHost(uri.getHost()) | |
.withProxyPort(uri.getPort())).getOrElseThrow(throwable -> | |
new S3StorageException("Unable to create client, proxy not available", throwable)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts an instance of <code>Observable<T></code> into | |
* an instance of <code>F.Promise<T></code> | |
* | |
* @return A <code>Promise<T></code> containing the value | |
* emitted by the observable | |
*/ | |
public static <T> Function<Observable<T>, F.Promise<T>> observableToFuture() | |
{ | |
return obs -> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum CouchbaseCachingClient implements ICachingClient { | |
INSTANCE; | |
private final org.slf4j.Logger logger = Logger.init(CouchbaseCachingClient.class); | |
/** | |
* A default key used for constructing a JsonNode from a String | |
* when storing Strings into Couchbase. |
NewerOlder