| org.apache.derby.iapi.store.raw.data.DataFactory
All known Subclasses: org.apache.derby.impl.store.raw.data.BaseDataFileFactory,
Method Summary | |
public long | addAndLoadStreamContainer(RawTransaction t, long segmentId, Properties tableProperties, RowSource rowSource) Create and load a stream container. | public long | addContainer(RawTransaction t, long segmentId, long containerid, int mode, Properties tableProperties, int temporaryFlag) Add a container.
Parameters: t - the transaction that is creating the container Parameters: segmentId - the segment where the container is to go Parameters: mode - whether or not to LOGGED or not. | public void | backupDataFiles(Transaction rt, File backupDir) Back up the data segment of the database. | public void | checkpoint() | public void | createFinished() | public int | decrypt(byte[] ciphertext, int offset, int length, byte[] cleartext, int outputOffset) Decrypt cleartext from ciphertext. | public void | dropContainer(RawTransaction t, ContainerKey containerId) | public void | dropStreamContainer(RawTransaction t, long segmentId, long containerId) Drop and remove a stream container. | public int | encrypt(byte[] cleartext, int offset, int length, byte[] ciphertext, int outputOffset, boolean newEngine) Encrypt cleartext into ciphertext. | public void | encryptAllContainers(RawTransaction t) Encrypt all the containers in the data segment. | public void | freezePersistentStore() | public long[] | getCacheStats(String cacheName) | public int | getEncryptionBlockSize() | public FileResource | getFileHandler() Get an object to handle non-transactional files. | public UUID | getIdentifier() Return the identifier that uniquely identifies this raw store at runtime.
This identifier is to be used as part of the lokcing key for objects
locked in the raw store by value (e.g. | long | getMaxContainerId() Return an id which can be used to create a container.
Return an id number with is greater than any existing container
in the current database. | public StorageFactory | getStorageFactory() | public void | idle() | public boolean | isReadOnly() Is the store read-only. | public ContainerHandle | openContainer(RawTransaction t, ContainerKey containerId, LockingPolicy locking, int mode) Open a container that is not droped.
Parameters: t - the raw transaction that is opening the container Parameters: containerId - the container's identity Parameters: locking - the locking policy Parameters: mode - see the different mode in @see ContainerHandlethen will return a null handle if the container is dropped. | public RawContainerHandle | openDroppedContainer(RawTransaction t, ContainerKey containerId, LockingPolicy locking, int mode) Open a container that may have been dropped.
Only internal raw store code should call this, e.g. | public StreamContainerHandle | openStreamContainer(RawTransaction t, long segmentId, long containerId, boolean hold) Open a stream container. | public void | postRecovery() Called after recovery is performed. | public void | reCreateContainerForRedoRecovery(RawTransaction t, long segmentId, long containerId, ByteArray containerInfo) re-Create a container during redo recovery. | public int | reclaimSpace(Serviceable work, ContextManager contextMgr) Reclaim space used by this factory. | public void | removeDroppedContainerFileStubs(LogInstant redoLWM) This function is called after a checkpoint to remove the stub files thar are not required
during recovery. | public void | removeOldVersionOfContainers(boolean inRecovery) | public void | removeStubsOK() Tell the data factory it is OK to remove committed deleted containers
when the data factory shuts down. | public void | resetCacheStats(String cacheName) | public void | setDatabaseEncrypted() | public void | setRawStoreFactory(RawStoreFactory rsf, boolean create, Properties properties) | public void | stop() | public void | unfreezePersistentStore() | public void | writeFinished() Backup restore - write finished, if this is the last writer, allow the
persistent store to proceed. | public void | writeInProgress() Backup restore - don't allow the persistent store to be frozen - or if
it is already frozen, block. |
DB_EX_LOCKFILE_NAME | final public static String DB_EX_LOCKFILE_NAME(Code) | | |
DB_LOCKFILE_NAME | final public static String DB_LOCKFILE_NAME(Code) | | The database lock
|
TEMP_SEGMENT_NAME | final public static String TEMP_SEGMENT_NAME(Code) | | The temporary segment is called "tmp"
|
addAndLoadStreamContainer | public long addAndLoadStreamContainer(RawTransaction t, long segmentId, Properties tableProperties, RowSource rowSource) throws StandardException(Code) | | Create and load a stream container.
Parameters: t - the transaction that is creating the container Parameters: segmentId - the segment where the container is to go Parameters: tableProperties - properties of the container that is persistentlystored throughout the lifetime of the container Parameters: rowSource - the data to load the container with the containerId of the newly created stream container exception: StandardException - Standard Cloudscape Error policy |
addContainer | public long addContainer(RawTransaction t, long segmentId, long containerid, int mode, Properties tableProperties, int temporaryFlag) throws StandardException(Code) | | Add a container.
Parameters: t - the transaction that is creating the container Parameters: segmentId - the segment where the container is to go Parameters: mode - whether or not to LOGGED or not. The effect of this modeis only for this addContainer call, not persisently storedthroughout the lifetime of the container Parameters: tableProperties - properties of the container that is persistentlystored throughout the lifetime of the container the containerId of the newly created container exception: StandardException - Standard Cloudscape Error policy |
encryptAllContainers | public void encryptAllContainers(RawTransaction t) throws StandardException(Code) | | Encrypt all the containers in the data segment.
Parameters: t - the transaction that is encrypting the containers. exception: StandardException - Standard Derby Error Policy |
freezePersistentStore | public void freezePersistentStore() throws StandardException(Code) | | Backup restore - stop writing dirty pages or container to disk
exception: StandardException - Standard Cloudscape error policy |
getCacheStats | public long[] getCacheStats(String cacheName)(Code) | | Get cache statistics for the specified cache
|
getEncryptionBlockSize | public int getEncryptionBlockSize()(Code) | | Return the encryption block size used by the algorithm at time of
encrypted database creation
|
getFileHandler | public FileResource getFileHandler()(Code) | | Get an object to handle non-transactional files.
|
getIdentifier | public UUID getIdentifier()(Code) | | Return the identifier that uniquely identifies this raw store at runtime.
This identifier is to be used as part of the lokcing key for objects
locked in the raw store by value (e.g. Containers).
|
getMaxContainerId | long getMaxContainerId() throws StandardException(Code) | | Return an id which can be used to create a container.
Return an id number with is greater than any existing container
in the current database. Caller will use this to allocate future
container numbers - most likely caching the value and then incrementing
it as it is used.
The an id which can be used to create a container. exception: StandardException - Standard exception policy. |
getStorageFactory | public StorageFactory getStorageFactory()(Code) | | The StorageFactory used by this dataFactory |
isReadOnly | public boolean isReadOnly()(Code) | | Is the store read-only.
|
openContainer | public ContainerHandle openContainer(RawTransaction t, ContainerKey containerId, LockingPolicy locking, int mode) throws StandardException(Code) | | Open a container that is not droped.
Parameters: t - the raw transaction that is opening the container Parameters: containerId - the container's identity Parameters: locking - the locking policy Parameters: mode - see the different mode in @see ContainerHandlethen will return a null handle if the container is dropped. the handle to the opened container exception: StandardException - Standard Cloudscape error policy |
reCreateContainerForRedoRecovery | public void reCreateContainerForRedoRecovery(RawTransaction t, long segmentId, long containerId, ByteArray containerInfo) throws StandardException(Code) | | re-Create a container during redo recovery.
Used if container is found to not exist during redo recovery of
log records creating the container.
exception: StandardException - Standard Cloudscape Error policy |
removeDroppedContainerFileStubs | public void removeDroppedContainerFileStubs(LogInstant redoLWM) throws StandardException(Code) | | This function is called after a checkpoint to remove the stub files thar are not required
during recovery. Crash recovery uses these files to identify the dropped
containers. Stub files(d*.dat) gets creates when a
table/index(containers) dropped.
exception: StandardException - Standard Cloudscape error policy |
removeOldVersionOfContainers | public void removeOldVersionOfContainers(boolean inRecovery) throws StandardException(Code) | | |
removeStubsOK | public void removeStubsOK()(Code) | | Tell the data factory it is OK to remove committed deleted containers
when the data factory shuts down.
|
resetCacheStats | public void resetCacheStats(String cacheName)(Code) | | Reset the cache statistics for the specified cache
|
setDatabaseEncrypted | public void setDatabaseEncrypted()(Code) | | |
unfreezePersistentStore | public void unfreezePersistentStore()(Code) | | Backup restore - start writing dirty pages or container to disk
|
writeFinished | public void writeFinished()(Code) | | Backup restore - write finished, if this is the last writer, allow the
persistent store to proceed.
|
writeInProgress | public void writeInProgress() throws StandardException(Code) | | Backup restore - don't allow the persistent store to be frozen - or if
it is already frozen, block. A write is about to commence.
exception: StandardException - Standard Cloudscape error policy |
|
|