org.apache.cocoon.transformation.helpers
Class PreemptiveLoader

java.lang.Object
  extended by org.apache.cocoon.transformation.helpers.PreemptiveLoader

public final class PreemptiveLoader
extends Object

The preemptive loader is a singleton that runs in the background and loads content into the cache.

Since:
2.1
Version:
CVS $Id: PreemptiveLoader.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler

Constructor Summary
PreemptiveLoader()
           
 
Method Summary
 void add(IncludeCacheStorageProxy proxy, String uri, long expires)
          Add a new task
 void process(ServiceManager manager, SourceResolver resolver, Logger logger)
          Start the preemptive loading
 void stop()
          Stop the loading.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreemptiveLoader

public PreemptiveLoader()
Method Detail

add

public void add(IncludeCacheStorageProxy proxy,
                String uri,
                long expires)
Add a new task

Parameters:
proxy - The cache to store the content
uri - The absolute URI to load
expires - The expires information used for the cache

process

public void process(ServiceManager manager,
                    SourceResolver resolver,
                    Logger logger)
Start the preemptive loading

Parameters:
manager - A component manager
resolver - A source resolver
logger - A logger

stop

public void stop()
Stop the loading. The loader stops when all tasks from the queue are processed.



Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.