com.fasterxml.clustermate.client.ahc.AHCEntryAccessors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clustermate-client-ahc Show documentation
Show all versions of clustermate-client-ahc Show documentation
Almost complete ClusterMate NetworkClient implementation built on
Async HTTP Client
The newest version!
package com.fasterxml.clustermate.client.ahc;
import com.fasterxml.clustermate.api.EntryKey;
import com.fasterxml.clustermate.client.ClusterServerNode;
import com.fasterxml.clustermate.client.EntryAccessors;
import com.fasterxml.clustermate.client.StoreClientConfig;
import com.fasterxml.clustermate.client.call.ContentDeleter;
import com.fasterxml.clustermate.client.call.ContentGetter;
import com.fasterxml.clustermate.client.call.ContentHeader;
import com.fasterxml.clustermate.client.call.ContentPutter;
import com.fasterxml.clustermate.client.call.EntryInspector;
import com.fasterxml.clustermate.client.call.EntryLister;
import com.ning.http.client.AsyncHttpClient;
public class AHCEntryAccessors
implements EntryAccessors
{
protected final StoreClientConfig _storeConfig;
protected final AsyncHttpClient _ahc;
public AHCEntryAccessors(StoreClientConfig storeConfig,
AsyncHttpClient ahc)
{
_storeConfig = storeConfig;
_ahc = ahc;
}
@Override
public ContentPutter entryPutter(ClusterServerNode server) {
return new AHCContentPutter(_storeConfig, _ahc, server);
}
@Override
public ContentGetter entryGetter(ClusterServerNode server) {
return new AHCContentGetter(_storeConfig, _ahc, server);
}
@Override
public ContentHeader entryHeader(ClusterServerNode server) {
return new AHCContentHeader(_storeConfig, _ahc, server);
}
@Override
public ContentDeleter entryDeleter(ClusterServerNode server) {
return new AHCContentDeleter(_storeConfig, _ahc, server);
}
@Override
public EntryLister entryLister(ClusterServerNode server) {
return new AHCEntryLister(_storeConfig, _ahc, server);
}
@Override
public EntryInspector entryInspector(ClusterServerNode server) {
return new AHCEntryInspector(_storeConfig, _ahc, server);
}
}