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

net.rubyeye.xmemcached.MemcachedClientCallable Maven / Gradle / Ivy

There is a newer version: 2.4.8
Show newest version
package net.rubyeye.xmemcached;

import java.util.concurrent.TimeoutException;

import net.rubyeye.xmemcached.exception.MemcachedException;

/**
 * MemcachedClient callable when using namespace in xmemcached.For example:
 * 
 * 
 *   memcachedClient.withNamespace(userId,new MemcachedClientCallable{
 *     public Void call(MemcachedClient client) throws MemcachedException,
 * 			InterruptedException, TimeoutException{
 *      client.set("username",0,username);
 *      client.set("email",0,email);
 *      return null;
 *     }
 *   }); 
 *   //invalidate all items under the namespace.
 *   memcachedClient.invalidateNamespace(userId);
 * 
* * @author dennis * @see MemcachedClient#withNamespace(String, MemcachedClientCallable) * @since 1.4.2 * @param */ public interface MemcachedClientCallable { public T call(MemcachedClient client) throws MemcachedException, InterruptedException, TimeoutException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy