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

com.jpattern.service.cache.NullCache Maven / Gradle / Ivy

There is a newer version: 3.6.2
Show newest version
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