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();
}
}
Aggregations