uk.ac.starlink.ttools
Class CacheFilter

java.lang.Object
  |
  +--uk.ac.starlink.ttools.CacheFilter
All Implemented Interfaces:
ProcessingFilter, ProcessingStep

public class CacheFilter
extends Object
implements ProcessingFilter, ProcessingStep

Processing step which caches the current table in a disk or memory cache (according to the default StoragePolicy). This is useful for efficiency reasons if downstream steps are going to make random-access or multiple use of an expensive step.

Since:
8 Mar 2005

Constructor Summary
CacheFilter()
           
 
Method Summary
 ProcessingStep createStep(Iterator argIt)
          Creates a new ProcessingStep based on a sequence of command-line arguments.
 String getFilterUsage()
          Returns a usage string for this filter.
 String getName()
          Returns the name of this filter.
 StarTable wrap(StarTable baseTable)
          Performs a table filtering step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheFilter

public CacheFilter()
Method Detail

getName

public String getName()
Description copied from interface: ProcessingFilter
Returns the name of this filter. Will be turned into a command-line flag (by prepending a '-') so it should be short.

Specified by:
getName in interface ProcessingFilter
Returns:
short name

getFilterUsage

public String getFilterUsage()
Description copied from interface: ProcessingFilter
Returns a usage string for this filter. Describes in standard format any required or optional command-line arguments required for it to work; this should match the arguments that are judged as legal by ProcessingFilter.createStep(java.util.Iterator).

Specified by:
getFilterUsage in interface ProcessingFilter
Returns:
usage string

createStep

public ProcessingStep createStep(Iterator argIt)
Description copied from interface: ProcessingFilter
Creates a new ProcessingStep based on a sequence of command-line arguments. The argIt argument is an iterator over the command-line arguments positioned just before any arguments intended for this filter. If legal, any that can be comprehended by this filter should be read (iterated over) and removed, and a ProcessingStep should accordingly be returned. If they are illegal, null should be returned. In the case of a successful (non-null) return, it is essential that no arguments other than the ones intended for this filter are read from the iterator.

Specified by:
createStep in interface ProcessingFilter
Parameters:
argIt - iterator over command-line arguments positioned just after the -getName() flag

wrap

public StarTable wrap(StarTable baseTable)
               throws IOException
Description copied from interface: ProcessingStep
Performs a table filtering step.

Specified by:
wrap in interface ProcessingStep
Parameters:
baseTable - input table
Returns:
output table
IOException

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.