com.jpattern.service.cache.NullCache Maven / Gradle / Ivy
package com.jpattern.service.cache;
import java.io.Serializable;
import com.jpattern.service.cache.statistics.ICacheStatistics;
import com.jpattern.service.cache.statistics.NullCacheStatistics;
/**
*
* @author Francesco Cina'
*
* 2 May 2011
*/
public class NullCache implements ICache {
@Override
public Serializable get(String key) {
return null;
}
@Override
public void put(String key, Serializable value) {
}
@Override
public void clear() {
}
@Override
public void remove(String key) {
}
@Override
public ICacheStatistics getCacheStatistics() {
return new NullCacheStatistics();
}
@Override
public String getName() {
return "";
}
@Override
public T get(String key, Class clazz) {
return null;
}
@Override
public boolean contains(String key) {
return false;
}
@Override
public int getSize() {
return 0;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy