com.maxifier.mxcache.provider.CacheManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mxcache-runtime Show documentation
Show all versions of mxcache-runtime Show documentation
Constains all classes necessary for launching a MxCache-instrumentated application
/*
* Copyright (c) 2008-2014 Maxifier Ltd. All Rights Reserved.
*/
package com.maxifier.mxcache.provider;
import com.maxifier.mxcache.caches.Cache;
import com.maxifier.mxcache.context.CacheContext;
import javax.annotation.Nullable;
/**
* Every CacheManager corresponds to exactly one @Cache method. It holds an associated CacheDescriptor.
*
* @author Alexander Kochurov ([email protected])
*/
public interface CacheManager {
/**
* @return descriptor for the cache
*/
CacheDescriptor getDescriptor();
/**
* Creates a new instance of cache.
* @param owner an instance of class that has cached method.
* @return created cache instance. Should match key type and value type of cache.
*/
Cache createCache(@Nullable T owner);
/**
* @return implementation details, e.g. class name of storage/cache
*/
String getImplementationDetails();
CacheContext getContext();
}