Note
No locks are used in this container. All transaction are not logged.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private StorageFile | |
| private BufferedInputStream | |
| private int | |
| private byte[] | |
| private BaseDataFileFactory | |
| private DecryptInputStream | |
| protected static final int | |
| protected static final int | |
| private StorageFile | |
| private InputStream | |
| private OutputStream | |
| protected static int | formatIdInteger
Constant Fields of the class |
| protected ContainerKey | identity
Fields of the class |
| protected static final int | |
| private LimitInputStream | |
| private FormatIdInputStream | |
| private FormatIdOutputStream | |
| protected static final int | |
| private DynamicByteArrayOutputStream | |
| private StoredRecordHeader | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private byte[] |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | StreamFileContainer(ContainerKey identity, BaseDataFileFactory dataFactory, Properties prop)
Constructor when rowSource is passed to the constructor, it will be loaded into the container after the container has been created. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public boolean | |
| public void | getContainerProperties(Properties
Property list to fill in. prop)Request the system properties associated with a stream container. |
| private static ContextService | |
| protected StorageFile | getFileName(ContainerKey identity, boolean forCreate, boolean errorOK)
Return a file name for the identity. |
| public ContainerKey | |
| private static Object | getServiceModule(final Object serviceModule, final String factoryInterface)
Must be private so that user code can't call this entry point. |
| public int | getTypeFormatId()
Implements org. Return my format identifier. |
| public void | |
| protected StreamFileContainer | Returns: The opened StreamFileContainer.Currently only accepts false, updating and existing
stream file container is not currently supported. forUpdate)Open a stream file container. |
| private synchronized boolean | |
| private synchronized boolean | |
| private synchronized InputStream | |
| private synchronized OutputStream | |
| private synchronized boolean | |
| public boolean | |
| public Object | |
| protected boolean | |
| private void | |
| private void |
| actionCode | back to summary |
|---|---|
| private int actionCode | |
| actionStorageFile | back to summary |
|---|---|
| private StorageFile actionStorageFile | |
| bufferedIn | back to summary |
|---|---|
| private BufferedInputStream bufferedIn | |
| bufferSize | back to summary |
|---|---|
| private int bufferSize | |
| ciphertext | back to summary |
|---|---|
| private byte[] ciphertext | |
| dataFactory | back to summary |
|---|---|
| private BaseDataFileFactory dataFactory | |
| decryptIn | back to summary |
|---|---|
| private DecryptInputStream decryptIn | |
| FIELD_HEADER_SIZE | back to summary |
|---|---|
| protected static final int FIELD_HEADER_SIZE | |
| FIELD_STATUS | back to summary |
|---|---|
| protected static final int FIELD_STATUS | |
| file | back to summary |
|---|---|
| private StorageFile file | |
| fileIn | back to summary |
|---|---|
| private InputStream fileIn | |
| fileOut | back to summary |
|---|---|
| private OutputStream fileOut | |
| formatIdInteger | back to summary |
|---|---|
| protected static int formatIdInteger Constant Fields of the class | |
| identity | back to summary |
|---|---|
| protected ContainerKey identity Fields of the class | |
| LARGE_SLOT_SIZE | back to summary |
|---|---|
| protected static final int LARGE_SLOT_SIZE | |
| limitIn | back to summary |
|---|---|
| private LimitInputStream limitIn | |
| logicalDataIn | back to summary |
|---|---|
| private FormatIdInputStream logicalDataIn | |
| logicalDataOut | back to summary |
|---|---|
| private FormatIdOutputStream logicalDataOut | |
| MIN_BUFFER_SIZE | back to summary |
|---|---|
| protected static final int MIN_BUFFER_SIZE | |
| out | back to summary |
|---|---|
| private DynamicByteArrayOutputStream out | |
| recordHeader | back to summary |
|---|---|
| private StoredRecordHeader recordHeader | |
| STORAGE_FILE_DELETE_ACTION | back to summary |
|---|---|
| private static final int STORAGE_FILE_DELETE_ACTION | |
| STORAGE_FILE_EXISTS_ACTION | back to summary |
|---|---|
| private static final int STORAGE_FILE_EXISTS_ACTION | |
| STORAGE_FILE_GET_INPUT_STREAM_ACTION | back to summary |
|---|---|
| private static final int STORAGE_FILE_GET_INPUT_STREAM_ACTION | |
| STORAGE_FILE_GET_OUTPUT_STREAM_ACTION | back to summary |
|---|---|
| private static final int STORAGE_FILE_GET_OUTPUT_STREAM_ACTION | |
| STORAGE_FILE_MKDIRS_ACTION | back to summary |
|---|---|
| private static final int STORAGE_FILE_MKDIRS_ACTION | |
| zeroBytes | back to summary |
|---|---|
| private byte[] zeroBytes | |
| StreamFileContainer | back to summary |
|---|---|
| pack-priv StreamFileContainer(ContainerKey identity, BaseDataFileFactory dataFactory) Constructor.
| |
| StreamFileContainer | back to summary |
|---|---|
| pack-priv StreamFileContainer(ContainerKey identity, BaseDataFileFactory dataFactory, Properties prop) throws StandardException Constructor when rowSource is passed to the constructor, it will be loaded into the container after the container has been created.
| |
| close | back to summary |
|---|---|
| protected void close() Close the stream file. Close this stream file, and all streams associated with it.
| |
| fetchNext | back to summary |
|---|---|
| public boolean fetchNext(Object[] row) throws StandardException | |
| getContainerProperties | back to summary |
|---|---|
| public void getContainerProperties(Properties prop) throws StandardException Request the system properties associated with a stream container. Request the value of properties associated with a stream container. The following properties can be requested: derby.storage.streamFileBufferSize To get the value of a particular property add it to the property list, and on return the value of the property will be set to it's current value. For example: get_prop(ConglomerateController cc) { Properties prop = new Properties(); prop.put("derby.storage.streamFileBufferSize", ""); cc.getContainerProperties(prop); System.out.println( "stream table's buffer size = " + prop.getProperty("derby.storage.streamFileBufferSize"); }
| |
| getContextService | back to summary |
|---|---|
| private static ContextService getContextService() Must be private so that user code can't call this entry point. | |
| getFileName | back to summary |
|---|---|
| protected StorageFile getFileName(ContainerKey identity, boolean forCreate, boolean errorOK) throws StandardException Return a file name for the identity. Return a valid file name for the identity, or null if the data directory for this segment cannot be created
| |
| getIdentity | back to summary |
|---|---|
| public ContainerKey getIdentity() Request the container key associated with the stream container. | |
| getServiceModule | back to summary |
|---|---|
| private static Object getServiceModule(final Object serviceModule, final String factoryInterface) Must be private so that user code can't call this entry point. | |
| getTypeFormatId | back to summary |
|---|---|
| public int getTypeFormatId() Implements org. Return my format identifier.
| |
| load | back to summary |
|---|---|
| public void load(RowSource rowSource) throws StandardException load data into this container. populate the stream container with data in the rowSource
| |
| open | back to summary |
|---|---|
| protected StreamFileContainer open(boolean forUpdate) throws StandardException Open a stream file container. Open a container. Open the file that maps to this container, if the file does not exist then we assume the container was never created and return. If the file exists but we have trouble opening it then we throw some exception.
| |
| privDelete | back to summary |
|---|---|
| private synchronized boolean privDelete(StorageFile file) | |
| privExists | back to summary |
|---|---|
| private synchronized boolean privExists(StorageFile file) | |
| privGetInputStream | back to summary |
|---|---|
| private synchronized InputStream privGetInputStream(StorageFile file) throws FileNotFoundException | |
| privGetOutputStream | back to summary |
|---|---|
| private synchronized OutputStream privGetOutputStream(StorageFile file) throws FileNotFoundException | |
| privMkdirs | back to summary |
|---|---|
| private synchronized boolean privMkdirs(StorageFile file) throws IOException | |
| removeContainer | back to summary |
|---|---|
| public boolean removeContainer() throws StandardException Close the stream file and remove the file.
| |
| run | back to summary |
|---|---|
| public Object run() throws IOException | |
| use | back to summary |
|---|---|
| protected boolean use(StreamContainerHandle handle) throws StandardException Can I use this container? This method always return true right now. In the future when there are different uses for this container, we may need to add qualifications for this.
| |
| writeColumn | back to summary |
|---|---|
| private void writeColumn(Object column) throws StandardException, IOException | |
| writeToFile | back to summary |
|---|---|
| private void writeToFile() throws StandardException Write the buffer to the file. If the database is encrypted, the dataFactory.getEncryptionBlockSize() - 1 reserved bytes will be used to pad the byte array to be dataFactory.getEncryptionBlockSize() aligned. Before the bytes are encrypted and written to the file stream, the actual length of the byte array is written out as a compressed integer. This number will be used when decrypting the data. If the database is not encrypted, then, we don't reserve the bytes upfront, and we simple just write the bytes out to the file stream.
| |