com.fasterxml.clustermate.client.jdk.BaseJdkHttpNetworkClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clustermate-client-jdk Show documentation
Show all versions of clustermate-client-jdk Show documentation
ClusterMate NetworkClient implementation built on default
JDK-provided HTTP client (HTTPUrlConnection)
package com.fasterxml.clustermate.client.jdk;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.storemate.shared.IpAndPort;
import com.fasterxml.clustermate.api.*;
import com.fasterxml.clustermate.client.*;
import com.fasterxml.clustermate.std.JdkHttpClientPathBuilder;
public abstract class BaseJdkHttpNetworkClient<
K extends EntryKey,
CONFIG extends StoreClientConfig
>
extends NetworkClient
{
protected final ObjectMapper _mapper;
protected final CONFIG _config;
/**
* The usual constructor to call; configures AHC using standard
* settings.
*/
protected BaseJdkHttpNetworkClient(CONFIG config)
{
_config = config;
_mapper = config.getJsonMapper();
}
/*
/**********************************************************************
/* Standard factory methods
/**********************************************************************
*/
@Override
public RequestPathBuilder pathBuilder(IpAndPort server)
{
return new JdkHttpClientPathBuilder(server);
}
@Override
public void shutdown() {
// nothing to do here
}
@Override
public EntryAccessors getEntryAccessors() {
return new JdkHttpEntryAccessors(_config);
}
@Override
public EntryKeyConverter getKeyConverter() {
return _config.getKeyConverter();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy