RESOLVE (mikem - 2/19/98) - Currently only getContainerClass() is abstract, there are probably more routines which should be abstract. Also the other implementations should probably inherit from the abstract class, rather than from the DataFileFactory class. Also there probably should be a generic directory and the rest of the filesystem implementations parallel to it. I wanted to limit the changes going into the branch and then fix inheritance stuff in main.
The code in this class was moved over from DataFileFactory.java and then that file was made to inherit from this one.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private StorageFile | |
| private File | |
| private String[] | |
| private static final int | |
| private CacheManager | |
| private ContainerKey | |
| private String | |
| private boolean | |
| private String | |
| pack-priv boolean | |
| pack-priv boolean | |
| private static final int | |
| private Hashtable | |
| private StorageFile | |
| private FileResource | |
| private StorageRandomAccessFile | |
| private static final int | |
| private final Object | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private UUID | |
| private boolean | |
| private boolean | |
| private boolean | |
| private HeaderPrintWriter | |
| private String | |
| private ProductVersionHolder | |
| private String | |
| private static final String | |
| private LogFactory | |
| private AllocationActions | |
| private PageActions | |
| private UUID | |
| private long | |
| private String | |
| private CacheManager | |
| private static final int | |
| private Hashtable | |
| private RawStoreFactory | |
| private boolean | |
| private static final int | |
| private static final int | |
| private static final int | |
| private boolean | |
| private static final int | |
| pack-priv StorageFactory | |
| private boolean | |
| private boolean | |
| private boolean | |
| private UndoHandler | |
| private UUIDFactory | |
| pack-priv WritableStorageFactory | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | addAndLoadStreamContainer(RawTransaction
the transaction that is creating the container t, long the segment where the container is to go segmentId, Properties properties of the container that is persistently
stored throughout the lifetime of the container tableProperties, RowSource the data to load the container with rowSource)Implements org. Add and load a stream container |
| public long | addContainer(RawTransaction
the transaction that is creating the container t, long the segment where the container is to go segmentId, long input_containerid, int whether or not to LOGGED or not. The effect of this mode
is only for this addContainer call, not persisently stored
throughout the lifetime of the container mode, Properties properties of the container that is persistently
stored throughout the lifetime of the container tableProperties, int temporaryFlag)Implements org. Add a container with a specified page size to a segment. |
| public void | backupDataFiles(Transaction rt, File backupDir)
Implements org. Back up the data segment of the database. |
| public void | boot(boolean
True if the database should be created create, Properties Configuration properties startParams)Implements org. Boot this module with the given properties. |
| private void | |
| private static Object | bootServiceModule(final boolean create, final Object serviceModule, final String factoryInterface, final Properties properties)
Must be private so that user code can't call this entry point. |
| private static String | Returns: the Java system property value from the JVM or a string capturing a security exception.Return values of system properties that identify the JVM. |
| private static String | Returns: the Java system property value for the OS or a string capturing a security exception.Return values of system properties that identify the OS. |
| public boolean | canSupport(Properties startParams)
Implements org. See if this implementation can support any attributes that are listed in properties. |
| public void | checkpoint()
Implements org. Implement checkpoint operation, write/sync all pages in cache. |
| public void | createFinished()
Implements org. Database creation finished |
| public final boolean | databaseEncrypted()
Implements org. Returns if data base is in encrypted mode. |
| public int | decrypt(byte[] ciphertext, int offset, int length, byte[] cleartext, int outputOffset)
Implements org. Decrypt cleartext from ciphertext. |
| public void | decryptAllContainers(RawTransaction
the transaction that is decrypting the container t)Implements org. Decrypts all the containers in the data segment. |
| public void | dropContainer(RawTransaction t, ContainerKey ckey)
Implements org. Drop a container. |
| public void | dropStreamContainer(RawTransaction t, long segmentId, long containerId)
Implements org. Drop a stream container. |
| public int | encrypt(byte[] cleartext, int offset, int length, byte[] ciphertext, int outputOffset, boolean newEngine)
Implements org. Encrypt cleartext into ciphertext. |
| public void | encryptAllContainers(RawTransaction
the transaction that is encrypting the containers. t)Implements org. Encrypt all the containers in the data segment. |
| pack-priv void | fileToRemove(StorageFile file, boolean remove)
Add a file to the list of files to be removed post recovery. |
| private synchronized long | |
| pack-priv void | |
| public void | freezePersistentStore()
Implements org. Backup restore - stop writing dirty pages or container to disk |
| public StorageFile | getAlternateContainerPath(ContainerKey
The container being opened/created containerId, boolean True if the file name for the stub is requested, otherwise the file name for the data file stub)Return an alternate path to container file relative to the root directory. |
| pack-priv CacheManager | |
| pack-priv synchronized String[] | Returns: An array of all the file names in seg0.get all the names of the files in seg 0. |
| public StorageFile | Returns: The StorageFile representing path to container relative to root.The container being opened/created containerId, boolean True if the file name for the stub is requested,
otherwise the file name for the data file stub)Return the path to a container file. |
| private synchronized StorageFile | |
| public int | getEncryptionBlockSize()
Implements org. Returns the encryption block size used by the algorithm at time of creation of an encrypted database |
| public FileResource | getFileHandler()
Implements org. Get an object to handle non-transactional files. |
| public UUID | getIdentifier()
Implements org. Return my unique identifier |
| public int | getIntParameter(String parameterName, Properties properties, int defaultValue, int minimumValue, int maximumValue)
|
| private void | getJBMSLockOnDB(UUID myUUID, UUIDFactory uuidFactory, String databaseDirectory)
check to see if we are the only JBMS opened against this database. |
| pack-priv LogFactory | |
| private AllocationActions | Returns: the PageActionsGet the loggable allocation action associated with this implementation |
| private PageActions | |
| public long | Returns: The an id which can be used to create a container.Implements org. Return an id which can be used to create a container. |
| private static ModuleFactory | |
| pack-priv synchronized long | |
| pack-priv CacheManager | |
| pack-priv RawStoreFactory | |
| public String | getRootDirectory()
Implements org. Get the root directory of the data storage area. |
| public StorageFactory | Returns: The StorageFactory used by this dataFactoryImplements org.
|
| public String | |
| private boolean | |
| public void | |
| protected void | insertUndoNotify(RawTransaction
raw transaction of the aborted insert. rxact, PageKey page key of the aborted insert. page_key)Notify through set handler that an undo of an insert has happened. |
| public boolean | isReadOnly()
Implements org. Is the store read-only. |
| private static String | Returns: the ClassPath of a jar filethe Class to ask to print the class name of an object cls)Return a jar file by asking the class's class loader for the location where the class was loaded from. |
| private void | |
| public boolean | |
| public StandardException | markCorrupt(StandardException originalError)
Implements org. Really this is just a convience routine for callers that might not have access to a log factory. |
| public Cacheable | |
| pack-priv Cacheable | |
| protected Cacheable | |
| public ContainerHandle | openContainer(RawTransaction
the raw transaction that is opening the container t, ContainerKey the container's identity containerId, LockingPolicy the locking policy locking, int see the different mode in @see ContainerHandle
then will return a null handle if the container is dropped. mode)Implements org. Open a container that is not droped. |
| private RawContainerHandle | openContainer(RawTransaction t, ContainerKey identity, LockingPolicy locking, int mode, boolean droppedOK)
|
| public RawContainerHandle | openDroppedContainer(RawTransaction t, ContainerKey containerId, LockingPolicy locking, int mode)
Implements org. Open a container that may have been dropped. |
| public StreamContainerHandle | openStreamContainer(RawTransaction t, long segmentId, long containerId, boolean hold)
Implements org. open an exsisting streamContainer |
| public void | postRecovery()
Implements org. Called after recovery is performed. |
| private void | |
| private void | |
| private void | |
| pack-priv int | |
| public int | reclaimSpace(Serviceable work, ContextManager contextMgr)
Implements org. Reclaim space used by this factory. |
| public void | reCreateContainerForRedoRecovery(RawTransaction t, long segmentId, long containerId, ByteArray containerInfo)
Implements org. re-Create a container during redo recovery. |
| private void | |
| public void | removeDroppedContainerFileStubs(LogInstant redoLWM)
Implements org. Delete the stub files that are not required for recovery. |
| public void | removeOldVersionOfContainers()
Implements org. Removes old versions of the containers after a cryptographic operation on the database. |
| private synchronized void | |
| public void | removeStubsOK()
Implements org. Tell the data factory it is OK to remove committed deleted containers when the data factory shuts down. |
| private synchronized void | |
| private void | restoreDataDirectory(String backupPath)
removes the data directory(seg*) from database home directory and restores it from backup location. |
| public final Object | |
| public void | setDatabaseEncrypted(boolean
true if the database is encrypted,
false otherwiseImplements org. Sets whether the database is encrypted. |
| public void | setRawStoreFactory(RawStoreFactory rsf, boolean create, Properties startParams)
Implements org. make data factory aware of which raw store factory it belongs to Also need to boot the LogFactory |
| public void | setUndoInsertEventHandler(UndoHandler
Class to use to notify callers of an undo of
an insert. input_undo_handle)Implements org. Register a handler class for insert undo events. |
| public void | setupCacheCleaner(DaemonService
daemon service to use for background cleaning daemon)Implements org. Set up the cache cleaner for the container cache and the page cache. |
| private static Object | startSystemModule(final String factoryInterface)
Must be private so that user code can't call this entry point. |
| public void | stop()
Implements org. Stop the module. |
| public void | stubFileToRemoveAfterCheckPoint(StorageFile file, LogInstant logInstant, Object identity)
keeps track of information about the stub files of the committed deleted containers. |
| public void | unfreezePersistentStore()
Implements org. Backup restore - start writing dirty pages or container to disk |
| public void | writeFinished()
Implements org. Backup restore - write finished, if this is the last writer, allow the persistent store to proceed. |
| public void | writeInProgress()
Implements org. Backup restore - don't allow the persistent store to be frozen - or if it is already frozen, block. |