Search in sources :

Example 1 with StreamContainerHandle

use of org.apache.derby.iapi.store.raw.StreamContainerHandle in project derby by apache.

the class BaseDataFileFactory method dropStreamContainer.

/**
 *		Drop a stream container.
 *
 *	    <P><B>Synchronisation</B>
 *		<P>
 *		This call will remove the container.
 *
 *		@exception StandardException Standard Derby error policy
 */
public void dropStreamContainer(RawTransaction t, long segmentId, long containerId) throws StandardException {
    boolean tmpContainer = (segmentId == ContainerHandle.TEMPORARY_SEGMENT);
    StreamContainerHandle containerHdl = null;
    try {
        ContainerKey ckey = new ContainerKey(segmentId, containerId);
        // close all open containers and 'onCommit' objects of the container
        t.notifyObservers(ckey);
        containerHdl = t.openStreamContainer(segmentId, containerId, false);
        if (tmpContainer && (containerHdl != null)) {
            containerHdl.removeContainer();
            return;
        }
    } finally {
        if (containerHdl != null)
            containerHdl.close();
    }
}
Also used : StreamContainerHandle(org.apache.derby.iapi.store.raw.StreamContainerHandle) ContainerKey(org.apache.derby.iapi.store.raw.ContainerKey)

Aggregations

ContainerKey (org.apache.derby.iapi.store.raw.ContainerKey)1 StreamContainerHandle (org.apache.derby.iapi.store.raw.StreamContainerHandle)1