kr.pe.kwonnam.hibernate4memcached.memcached.MemcachedAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate4-memcached-core Show documentation
Show all versions of hibernate4-memcached-core Show documentation
hibernate4 memcached L2 cache implementation.
package kr.pe.kwonnam.hibernate4memcached.memcached;
import java.util.Properties;
/**
* Adapter for memcached operation.
*
*
* When Hibernate Session factory closed, {@link #destroy} method will be called automatically.
*
* @author KwonNam Son ([email protected])
*/
public interface MemcachedAdapter {
/**
* Lifecycle callback to perform initialization.
*
* @param properties the defined cfg properties
*/
void init(Properties properties);
/**
* Lifecycle callback to perform cleanup.
*/
void destroy();
Object get(CacheNamespace cacheNamespace, String key);
void set(CacheNamespace cacheNamespace, String key, Object value, int expirySeconds);
void delete(CacheNamespace cacheNamespace, String key);
void evictAll(CacheNamespace cacheNamespace);
}