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

jasmine.mock.framework.cache.MockCacheService Maven / Gradle / Ivy

There is a newer version: 1.3.8
Show newest version
package jasmine.mock.framework.cache;

import jasmine.framework.cache.CacheService;
import jasmine.framework.common.util.CheckUtil;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.function.Supplier;

/**
 * @author mh.z
 */
@Component
public class MockCacheService implements CacheService {

    @Override
    public  T get(String category, Object key, Class type) {
        return null;
    }

    @Override
    public  T get(String category, Object key, Class type, Supplier supplier) {
        CheckUtil.notNull(supplier, "supplier null");

        return (T) supplier.get();
    }

    @Override
    public  List getList(String category, Object key, Class type) {
        return null;
    }

    @Override
    public  List getList(String category, Object key, Class type, Supplier> supplier) {
        CheckUtil.notNull(supplier, "supplier null");

        return supplier.get();
    }

    @Override
    public void set(String category, Object key, Object value) {
        //
    }

    @Override
    public void remove(String category, Object key) {
        //
    }

    @Override
    public void sync(String category, Object key, Supplier supplier) {
        //
    }

}