net.sf.javaprinciples.resource.ResourceCache Maven / Gradle / Ivy
package net.sf.javaprinciples.resource;
/**
* @author wslade
*/
@SuppressWarnings("unchecked")
public interface ResourceCache
{
/**
* @param identifier A non null URN
* @return true when the resource matching the identifier is present
*/
public boolean containsResource(ResourceIdentifier identifier);
/**
* @param identifier A non null URN
* @return A matching resource when present. Null otherwise
*/
public Resource getResource(ResourceIdentifier identifier);
/**
* @param identifier A non null URN
* @param resource A non null resource to save for later
*/
public void putResource(ResourceIdentifier identifier, Resource resource);
/**
* Clear the entire resource cache.
*/
public void clear();
/**
* Clear a specific resource from the cache based on supplied identifier.
* @param identifier The Identifier of the resource to remove from the cache.
*/
public void clear(ResourceIdentifier identifier);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy