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

org.xson.web.cache.AbstractCache Maven / Gradle / Ivy

Go to download

xco-web is an easy to use control layer framework, is part of the SOA system, using xml language to describe the controller.

The newest version!
package org.xson.web.cache;

import java.util.Map;

public abstract class AbstractCache implements ICache {

	@Override
	public void start(String resource, Map properties) {
		throw new CacheException("This method subclass must implement");
	}

	@Override
	public void stop() {
		throw new CacheException("This method subclass must implement");
	}

	@Override
	public void putObject(Object key, Object value) {
		putObject(key, value, null);
	}

	@Override
	public void clear() {
	}

	@Override
	public int getSize() {
		return -1;// return 0;
	}

	@Override
	public String getId() {
		return null;
	}

	protected String	keyEncode	= "UTF-8";

	protected String parseKey(Object key) {
		if (null == key) {
			throw new CacheException("cache key does not allow null");
		}
		if (key instanceof String) {
			return (String) key;
		}
		return key.toString();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy