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

com.maxifier.mxcache.provider.CacheManager Maven / Gradle / Ivy

Go to download

Constains all classes necessary for launching a MxCache-instrumentated application

There is a newer version: 2.6.9
Show newest version
/*
 * 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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy