org.quattor.pan.cache
Class Valid2Cache

java.lang.Object
  extended by org.quattor.pan.cache.AbstractCache<Valid2Result>
      extended by org.quattor.pan.cache.Valid2Cache

public class Valid2Cache
extends AbstractCache<Valid2Result>

A global cache of all pan objects that have been through the second validation phase.

Author:
loomis

Field Summary
 
Fields inherited from class org.quattor.pan.cache.AbstractCache
compiler
 
Constructor Summary
Valid2Cache(Compiler compiler)
          Creates a new Valid2Cache that has a default, initial size of 1000 entries.
Valid2Cache(Compiler compiler, int size)
           
 
Method Summary
protected  Task<Valid2Result> createTask(java.lang.String objectName)
          Creates a new task to be put into the cache, if necessary.
protected  TaskResult.ResultType getExecutorQueueType()
          Subclasses must return the executor queue type for the particular class.
 
Methods inherited from class org.quattor.pan.cache.AbstractCache
retrieve, retrieve, waitForResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Valid2Cache

public Valid2Cache(Compiler compiler)
Creates a new Valid2Cache that has a default, initial size of 1000 entries.

Parameters:
compiler - associated compiler for this cache

Valid2Cache

public Valid2Cache(Compiler compiler,
                   int size)
Method Detail

createTask

protected Task<Valid2Result> createTask(java.lang.String objectName)
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<Valid2Result>
Parameters:
objectName - 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<Valid2Result>
Returns:
executor queue type to use for created tasks


Copyright © 2011 Quattor. All Rights Reserved.