net.sf.javaprinciples.resource
Interface ResourceCache


public interface ResourceCache

Author:
wslade

Method Summary
 void clear()
          Clear the entire resource cache.
 void clear(ResourceIdentifier identifier)
          Clear a specific resource from the cache based on supplied identifier.
 boolean containsResource(ResourceIdentifier identifier)
           
 Resource getResource(ResourceIdentifier identifier)
           
 void putResource(ResourceIdentifier identifier, Resource resource)
           
 

Method Detail

containsResource

boolean containsResource(ResourceIdentifier identifier)
Parameters:
identifier - A non null URN
Returns:
true when the resource matching the identifier is present

getResource

Resource getResource(ResourceIdentifier identifier)
Parameters:
identifier - A non null URN
Returns:
A matching resource when present. Null otherwise

putResource

void putResource(ResourceIdentifier identifier,
                 Resource resource)
Parameters:
identifier - A non null URN
resource - A non null resource to save for later

clear

void clear()
Clear the entire resource cache.


clear

void clear(ResourceIdentifier identifier)
Clear a specific resource from the cache based on supplied identifier.

Parameters:
identifier - The Identifier of the resource to remove from the cache.


Copyright © 2013. All Rights Reserved.