Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.subsystems.qsys.cache
Class AbstractCacheHandler

java.lang.Object
  extended by com.ibm.etools.iseries.subsystems.qsys.cache.AbstractCacheHandler
Direct Known Subclasses:
IFSCacheHandler, QSYSJobCacheHandler, QSYSObjectCacheHandler

public class AbstractCacheHandler
extends Object

Parent class for cache handlers.


Field Summary
static String copyright
           
 
Constructor Summary
protected AbstractCacheHandler(String hostname, String handlerName)
           
 
Method Summary
protected  void addToOutputXNumberOfLines(int numberOfLinesToAdd, BufferedReader in, List<String> output)
          Add the number of lines into the output List provided
protected  void backupAndDeleteCacheFile(String filename)
          Code to cleanup corrupted cache files.
protected  void checkCacheSize()
           
 String getCacheRootDirectory()
          Get the file system root location for the current cache handler.
protected  String getListingDetailsFileName()
          Get the name of the file used for listing the basic properties of Elements
protected  BufferedReader getReader(String filename)
          Utility method for getting and PrintWriter for and output file
protected  BufferedWriter getWriter(String filename)
          Utility method for getting and PrintWriter for and output file
protected  boolean isCachingDisabled()
           
 void setCacheLocation(String location)
           
protected  void skipNumberOfLines(int numberOfLinesToSkip, BufferedReader in)
          Skip the passed number of lines
protected  void writeFile(String filename, List<String> output)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static String copyright
Constructor Detail

AbstractCacheHandler

protected AbstractCacheHandler(String hostname,
                               String handlerName)
Method Detail

setCacheLocation

public void setCacheLocation(String location)

getCacheRootDirectory

public String getCacheRootDirectory()
Get the file system root location for the current cache handler.


getListingDetailsFileName

protected String getListingDetailsFileName()
Get the name of the file used for listing the basic properties of Elements


getWriter

protected BufferedWriter getWriter(String filename)
                            throws UnsupportedEncodingException,
                                   FileNotFoundException
Utility method for getting and PrintWriter for and output file

Throws:
FileNotFoundException
UnsupportedEncodingException

getReader

protected BufferedReader getReader(String filename)
Utility method for getting and PrintWriter for and output file

Throws:
FileNotFoundException
UnsupportedEncodingException

backupAndDeleteCacheFile

protected void backupAndDeleteCacheFile(String filename)
Code to cleanup corrupted cache files.


skipNumberOfLines

protected void skipNumberOfLines(int numberOfLinesToSkip,
                                 BufferedReader in)
                          throws IOException
Skip the passed number of lines

Throws:
IOException

addToOutputXNumberOfLines

protected void addToOutputXNumberOfLines(int numberOfLinesToAdd,
                                         BufferedReader in,
                                         List<String> output)
                                  throws IOException
Add the number of lines into the output List provided

Throws:
IOException

writeFile

protected void writeFile(String filename,
                         List<String> output)

isCachingDisabled

protected boolean isCachingDisabled()

checkCacheSize

protected void checkCacheSize()

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.