Class JarStorageFactory

java.lang.Object
org.apache.derby.impl.io.BaseStorageFactory
org.apache.derby.impl.io.JarStorageFactory
All Implemented Interfaces:
StorageFactory

public class JarStorageFactory extends BaseStorageFactory
This class provides a Jar file based implementation of the StorageFactory interface. It is used by the database engine to access persistent data and transaction logs under the jar subsubprotocol.
  • Field Details

  • Constructor Details

    • JarStorageFactory

      public JarStorageFactory()
  • Method Details

    • newPersistentFile

      StorageFile newPersistentFile(String path)
      Construct a persistent StorageFile from a path name.
      Specified by:
      newPersistentFile in class BaseStorageFactory
      Parameters:
      path - The path name of the file
      Returns:
      A corresponding StorageFile object
    • newPersistentFile

      StorageFile newPersistentFile(String directoryName, String fileName)
      Construct a StorageFile from a directory and file name.
      Specified by:
      newPersistentFile in class BaseStorageFactory
      Parameters:
      directoryName - The directory part of the path name. Must not be null, nor may it be in the temp dir.
      fileName - The name of the file within the directory.
      Returns:
      A corresponding StorageFile object
    • newPersistentFile

      StorageFile newPersistentFile(StorageFile directoryName, String fileName)
      Construct a StorageFile from a directory and file name.
      Specified by:
      newPersistentFile in class BaseStorageFactory
      Parameters:
      directoryName - The directory part of the path name.
      fileName - The name of the file within the directory.
      Returns:
      A corresponding StorageFile object
    • doInit

      void doInit() throws IOException
      Specified by:
      doInit in class BaseStorageFactory
      Throws:
      IOException
    • shutdown

      public void shutdown()
      Close the opened jar/zip file on shutdown. (Fix for DERBY-2083).
      Specified by:
      shutdown in interface StorageFactory
      Overrides:
      shutdown in class BaseStorageFactory
    • getJarFile

      private File getJarFile(String name)