Package org.apache.derby.impl.io
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 Summary
Fields Modifier and Type Field Description (package private) java.util.zip.ZipFile
zipData
-
Fields inherited from class org.apache.derby.impl.io.BaseStorageFactory
canonicalName, dataDirectory, home, separatedDataDirectory, tempDir, tempDirPath, uniqueName
-
Fields inherited from interface org.apache.derby.io.StorageFactory
VERSION_NUMBER
-
-
Constructor Summary
Constructors Constructor Description JarStorageFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
doInit()
private java.io.File
getJarFile(java.lang.String name)
(package private) StorageFile
newPersistentFile(java.lang.String path)
Construct a persistent StorageFile from a path name.(package private) StorageFile
newPersistentFile(java.lang.String directoryName, java.lang.String fileName)
Construct a StorageFile from a directory and file name.(package private) StorageFile
newPersistentFile(StorageFile directoryName, java.lang.String fileName)
Construct a StorageFile from a directory and file name.void
shutdown()
Close the opened jar/zip file on shutdown.-
Methods inherited from class org.apache.derby.impl.io.BaseStorageFactory
createTempDir, createTemporaryFile, getCanonicalName, getSeparator, getStorageFactoryVersion, getTempDir, init, isFast, isReadOnlyDatabase, newStorageFile, newStorageFile, newStorageFile, setCanonicalName, supportsRandomAccess
-
-
-
-
Method Detail
-
newPersistentFile
StorageFile newPersistentFile(java.lang.String path)
Construct a persistent StorageFile from a path name.- Specified by:
newPersistentFile
in classBaseStorageFactory
- Parameters:
path
- The path name of the file- Returns:
- A corresponding StorageFile object
-
newPersistentFile
StorageFile newPersistentFile(java.lang.String directoryName, java.lang.String fileName)
Construct a StorageFile from a directory and file name.- Specified by:
newPersistentFile
in classBaseStorageFactory
- 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, java.lang.String fileName)
Construct a StorageFile from a directory and file name.- Specified by:
newPersistentFile
in classBaseStorageFactory
- 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 java.io.IOException
- Specified by:
doInit
in classBaseStorageFactory
- Throws:
java.io.IOException
-
shutdown
public void shutdown()
Close the opened jar/zip file on shutdown. (Fix for DERBY-2083).- Specified by:
shutdown
in interfaceStorageFactory
- Overrides:
shutdown
in classBaseStorageFactory
-
getJarFile
private java.io.File getJarFile(java.lang.String name)
-
-