net.rubyeye.xmemcached.MemcachedClientCallable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xmemcached Show documentation
Show all versions of xmemcached Show documentation
Extreme performance modern memcached client for java
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