All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ar.com.siripo.arcache.backend.memcached.ArcacheMemcachedClient Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package ar.com.siripo.arcache.backend.memcached;

import java.util.concurrent.Future;

import ar.com.siripo.arcache.backend.ArcacheBackendClient;
import net.spy.memcached.MemcachedClientIF;

/**
 * Adaptador de la interfaz a memcached
 * 
 * @author Mariano Santamarina
 *
 */
public class ArcacheMemcachedClient implements ArcacheBackendClient {

	private MemcachedClientIF memcachedClient;

	public ArcacheMemcachedClient(MemcachedClientIF memcachedClient) {
		this.memcachedClient = memcachedClient;
	}

	@Override
	public Future asyncSet(String key, int ttlSeconds, Object value) {
		return memcachedClient.set(key, ttlSeconds, value);
	}

	@Override
	public Future asyncGet(String key) {
		return memcachedClient.asyncGet(key);
	}

}