org.jboss.deployers.vfs.spi.structure.modified
Interface StructureCache<T>

Type Parameters:
T - exact cache value type
All Known Implementing Classes:
DefaultStructureCache, TreeStructureCache

public interface StructureCache<T>

Simple structure cache.

Author:
Ales Justin

Method Summary
 void flush()
          Flush the cache.
 T getCacheValue(String pathName)
          Get cache value.
 Set<String> getLeaves(String pathName)
          Get leaves for this path name parameter.
 void initializeCache(String pathName)
          Initialize cache.
 void invalidateCache(String pathName)
          Invalidate cache for path name.
 T putCacheValue(String pathName, T value)
          Put cache value.
 void removeCache(String pathName)
          Remove cache for path name.
 

Method Detail

initializeCache

void initializeCache(String pathName)
Initialize cache.

Parameters:
pathName - the path name

putCacheValue

T putCacheValue(String pathName,
                T value)
Put cache value.

Parameters:
pathName - the path name
value - the value
Returns:
previous value

getCacheValue

T getCacheValue(String pathName)
Get cache value.

Parameters:
pathName - the path name
Returns:
the cache value

getLeaves

Set<String> getLeaves(String pathName)
Get leaves for this path name parameter. Only exact sub path nodes count in. This method should return a mutable Set copy as we intend to modify it in checker processing.

Parameters:
pathName - the path name
Returns:
sub-paths nodes or null if no such match yet

invalidateCache

void invalidateCache(String pathName)
Invalidate cache for path name.

Parameters:
pathName - the path name

removeCache

void removeCache(String pathName)
Remove cache for path name.

Parameters:
pathName - the path name

flush

void flush()
Flush the cache.



Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.