org.quattor.pan.cache
Class CompileCache
java.lang.Object
org.quattor.pan.cache.AbstractCache<CompileResult>
org.quattor.pan.cache.CompileCache
public class CompileCache
- extends AbstractCache<CompileResult>
Contains a global cache of all compiled templates.
- Author:
- loomis
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompileCache
public CompileCache(Compiler compiler)
- Creates a new
CompileCache with a default, initial size of
1000 entries.
- Parameters:
compiler - associated compiler for this cache
CompileCache
public CompileCache(Compiler compiler,
int size)
compile
public Future<CompileResult> compile(String tplfile)
- Unconditionally compiles the template, but does not put it into the
cache. This is useful for (re)compilations of a large number of template
where keeping them for a build is not necessary.
- Parameters:
tplfile - absolute path of the file to compile
- Returns:
- return a result that contains the compiled template
createTask
protected CompileTask createTask(String tplfile)
- Description copied from class:
AbstractCache
- Creates a new task to be put into the cache, if necessary. Concrete
implementations must supply a method that generates a task that will
return the appropriate type.
- Specified by:
createTask in class AbstractCache<CompileResult>
- Parameters:
tplfile - Key used to generate the associated task.
- Returns:
- new task associated with the given key
getExecutorQueueType
protected TaskResult.ResultType getExecutorQueueType()
- Description copied from class:
AbstractCache
- Subclasses must return the executor queue type for the particular class.
- Specified by:
getExecutorQueueType in class AbstractCache<CompileResult>
- Returns:
- executor queue type to use for created tasks
getRelativePath
public static final String getRelativePath(File baseDirectory,
File file)
annotationOutputFile
public static File annotationOutputFile(File annotationDirectory,
String relativePath)
Copyright © 2011 Quattor. All Rights Reserved.