com.dtolabs.rundeck.core.utils.cache
Class FileCache.LastModifiedExpiration<T>

java.lang.Object
  extended by com.dtolabs.rundeck.core.utils.cache.FileCache.LastModifiedExpiration<T>
All Implemented Interfaces:
FileCache.Expiration<T>
Enclosing class:
FileCache<T extends FileCache.Cacheable>

public static class FileCache.LastModifiedExpiration<T>
extends java.lang.Object
implements FileCache.Expiration<T>

Expires items if the lastModified of the file is greater than the cached time for the item.


Constructor Summary
FileCache.LastModifiedExpiration()
           
 
Method Summary
 boolean isExpired(java.io.File file, java.lang.Long cacheTime, T item)
          Return true if the item associated with the file has expired, given the last timestamp associated with the item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCache.LastModifiedExpiration

public FileCache.LastModifiedExpiration()
Method Detail

isExpired

public boolean isExpired(java.io.File file,
                         java.lang.Long cacheTime,
                         T item)
Description copied from interface: FileCache.Expiration
Return true if the item associated with the file has expired, given the last timestamp associated with the item

Specified by:
isExpired in interface FileCache.Expiration<T>
Parameters:
file - the file
cacheTime - the time the item was last cached
item - the cached item
Returns:
true if the item should expire