Class DBCacheEntry


  • public class DBCacheEntry
    extends Object
    This class represents a single entry in a database cache. A single entry in this case usually means: a single SQL query.
    Since:
    15-01-04
    Author:
    Matt
    • Constructor Detail

      • DBCacheEntry

        public DBCacheEntry​(String dbname,
                            String sql)
      • DBCacheEntry

        public DBCacheEntry()
      • DBCacheEntry

        public DBCacheEntry​(DataInputStream dis)
                     throws KettleFileException
        Read the data for this Cache entry from a data input stream
        Parameters:
        dis - The DataInputStream to read this entry from.
        Throws:
        KettleFileException - if the cache can't be read from disk when it should be able to. If the cache file doesn't exists, no exception is thrown
    • Method Detail

      • sameDB

        public boolean sameDB​(String otherDb)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • write

        public boolean write​(DataOutputStream dos)
        Write the data for this Cache entry to a data output stream
        Parameters:
        dos - The DataOutputStream to write this entry to.
        Returns:
        True if all went well, false if an error occured!