nyla.solutions.global.patterns.cache.Cache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nyla.solutions.global Show documentation
Show all versions of nyla.solutions.global Show documentation
Nyla Solutions Global Java API provides support for basic application
utilities (application configuration, data encryption, debugger and text
processing).
The newest version!
package nyla.solutions.global.patterns.cache;
import java.util.Map;
import nyla.solutions.global.exception.NoDataFoundException;
/**
* Cache of objects
* @author Gregory Green
*
*/
public interface Cache extends Map
{
/**
*
* @param objClass the class key
* @return the object with matching class key
* @throws NoDataFoundException
*/
Object getObject(Class> objClass)
throws NoDataFoundException;
/**
*
* @param objClass the object class key
* @param obj the Cooresponding object
*/
void setObject(Class> objClass, V obj);
/**
* Remove an object from the cache
* @param objClass the object class key
*/
void removeObject(Class> objClass);
}