java.security.PrivilegedAction<java.lang.Boolean>
public class EncryptOrDecryptData
extends java.lang.Object
implements java.security.PrivilegedAction<java.lang.Boolean>
Modifier and Type | Field | Description |
---|---|---|
private int |
actionCode |
|
private StorageFile |
actionDestStorageFile |
|
private StorageFile |
actionStorageFile |
|
private BaseDataFileFactory |
dataFactory |
|
private static int |
STORAGE_FILE_DELETE_ACTION |
|
private static int |
STORAGE_FILE_EXISTS_ACTION |
|
private static int |
STORAGE_FILE_RENAME_ACTION |
|
private StorageFactory |
storageFactory |
Constructor | Description |
---|---|
EncryptOrDecryptData(BaseDataFileFactory dataFactory) |
Modifier and Type | Method | Description |
---|---|---|
void |
decryptAllContainers(RawTransaction t) |
Finds all the all the containers stored in the data directory and
decrypts them.
|
void |
encryptAllContainers(RawTransaction t) |
Find all the all the containers stored in the data directory and
encrypt them.
|
private void |
encryptOrDecryptAllContainers(RawTransaction t,
boolean doEncrypt) |
Encrypts or decrypts all containers in the database data directory.
|
private void |
encryptOrDecryptContainer(RawTransaction t,
ContainerKey ckey,
boolean doEncrypt) |
Encrypts or decrypts the specified container.
|
private StorageFile |
getFile(java.lang.String ctrFileName) |
|
private StorageFile |
getFile(ContainerKey containerId,
boolean old) |
Get file handle to a container file that is used to keep
temporary versions of the container file.
|
private java.lang.String |
getFilePath(ContainerKey containerId,
boolean old) |
Get path to a container file that is used to keep temporary versions of
the container file.
|
private boolean |
isOldContainerFile(java.lang.String fileName) |
|
private boolean |
privDelete(StorageFile file) |
|
private boolean |
privExists(StorageFile file) |
|
private boolean |
privRename(StorageFile fromFile,
StorageFile destFile) |
|
void |
removeOldVersionOfContainers() |
Removes old versions of the containers after a cryptographic operation
on the database.
|
(package private) void |
restoreContainer(ContainerKey containerId) |
|
java.lang.Boolean |
run() |
private BaseDataFileFactory dataFactory
private StorageFactory storageFactory
private static final int STORAGE_FILE_EXISTS_ACTION
private static final int STORAGE_FILE_DELETE_ACTION
private static final int STORAGE_FILE_RENAME_ACTION
private int actionCode
private StorageFile actionStorageFile
private StorageFile actionDestStorageFile
public EncryptOrDecryptData(BaseDataFileFactory dataFactory)
public void decryptAllContainers(RawTransaction t) throws StandardException
t
- the transaction that is used for the decryption operationStandardException
- Standard Derby error policypublic void encryptAllContainers(RawTransaction t) throws StandardException
t
- the transaction that is used for the encryption operationStandardException
- Standard Derby error policyprivate void encryptOrDecryptAllContainers(RawTransaction t, boolean doEncrypt) throws StandardException
t
- transaction used for the cryptographic operationdoEncrypt
- tells whether to encrypt or decryptStandardException
- Standard Derby error policyprivate void encryptOrDecryptContainer(RawTransaction t, ContainerKey ckey, boolean doEncrypt) throws StandardException
t
- transaction that used to perform the cryptographic operationckey
- the key of the container that is being encrypted/decrypteddoEncrypt
- tells whether to encrypt or decryptStandardException
- Standard Derby error policyprivate StorageFile getFile(ContainerKey containerId, boolean old)
private java.lang.String getFilePath(ContainerKey containerId, boolean old)
private boolean isOldContainerFile(java.lang.String fileName)
private StorageFile getFile(java.lang.String ctrFileName)
void restoreContainer(ContainerKey containerId) throws StandardException
StandardException
public void removeOldVersionOfContainers() throws StandardException
StandardException
private boolean privExists(StorageFile file)
private boolean privDelete(StorageFile file)
private boolean privRename(StorageFile fromFile, StorageFile destFile)
public java.lang.Boolean run()
run
in interface java.security.PrivilegedAction<java.lang.Boolean>
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.