Top Description Fields Constructors Methods
org.apache.derby.impl.store.raw.data

pack-priv final Class StreamFileContainerHandle

extends Object
implements StreamContainerHandle, DerbyObserver
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.services.monitor.DerbyObserver, org.apache.derby.iapi.store.raw.StreamContainerHandle
Imports
org.apache.derby.iapi.services.locks.Lockable, org.apache.derby.iapi.services.monitor.DerbyObservable, .DerbyObserver, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.raw.StreamContainerHandle, .ContainerKey, org.apache.derby.iapi.store.raw.xact.RawTransaction, org.apache.derby.iapi.types.DataValueDescriptor, org.apache.derby.impl.store.raw.data.DropOnCommit, org.apache.derby.catalog.UUID, java.util.Properties

A handle to an open stream container, implememts StreamContainerHandle.

This class is an Observer to observe RawTransactions
MT - Mutable - Immutable identity - Thread Aware

Field Summary

Modifier and TypeField and Description
protected boolean
active

Is this StreamContainerHandle active.

protected StreamFileContainer
container

The actual container we are accessing.

private boolean
hold

Whether this container should be held open across commit.

protected final ContainerKey
identity

Container identifier MT - Immutable

private final UUID
rawStoreId

Raw Store identifier MT - Immutable

protected RawTransaction
xact

our transaction.

Constructor Summary

AccessConstructor and Description
public
StreamFileContainerHandle(UUID rawStoreId, RawTransaction xact, ContainerKey identity, boolean hold)

public
StreamFileContainerHandle(UUID rawStoreId, RawTransaction xact, StreamFileContainer container, boolean hold)

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
fetchNext(DataValueDescriptor[]
Row to be filled in with information from the record.
row
)

Implements org.apache.derby.iapi.store.raw.StreamContainerHandle.fetchNext.

fetch a row from the container.

public void
getContainerProperties(Properties
Property list to fill in.
prop
)

Implements org.apache.derby.iapi.store.raw.StreamContainerHandle.getContainerProperties.

Request the system properties associated with a container.

public ContainerKey
getId()

Implements org.apache.derby.iapi.store.raw.StreamContainerHandle.getId.

get the container key for the stream container

public final RawTransaction
getTransaction()

Return the RawTransaction this object was opened in.

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
update(DerbyObservable
The object which is being observed
obj
,
Object
Extra information being passed to the callback
arg
)

Implements org.apache.derby.iapi.services.monitor.DerbyObserver.update.

Called when the transaction is about to complete.

public boolean
useContainer()

Attach me to a container.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

activeback to summary
protected boolean active

Is this StreamContainerHandle active.
MT - Mutable : scoped

containerback to summary
protected StreamFileContainer container

The actual container we are accessing. Only valid when active is true.
MT - Mutable : scoped

holdback to summary
private boolean hold

Whether this container should be held open across commit. Only valid when active is true.
MT - Mutable : scoped

identityback to summary
protected final ContainerKey identity

Container identifier
MT - Immutable

rawStoreIdback to summary
private final UUID rawStoreId

Raw Store identifier
MT - Immutable

xactback to summary
protected RawTransaction xact

our transaction. Only valid when active is true.
MT - Mutable : scoped

Constructor Detail

StreamFileContainerHandleback to summary
public StreamFileContainerHandle(UUID rawStoreId, RawTransaction xact, ContainerKey identity, boolean hold)
StreamFileContainerHandleback to summary
public StreamFileContainerHandle(UUID rawStoreId, RawTransaction xact, StreamFileContainer container, boolean hold)

Method Detail

closeback to summary
public void close()

Implements org.apache.derby.iapi.store.raw.StreamContainerHandle.close.

Doc from org.apache.derby.iapi.store.raw.StreamContainerHandle.close.

Close me. After using this method the caller must throw away the reference to the Container object, e.g.

	ref.close();
	ref = null;

The container will be closed automatically at the commit or abort of the transaction if this method is not called explictly.
Exceptions
StandardException:
Standard exception policy.
See Also
StreamContainerHandle#close
fetchNextback to summary
public boolean fetchNext(DataValueDescriptor[] row) throws StandardException

Implements org.apache.derby.iapi.store.raw.StreamContainerHandle.fetchNext.

fetch a row from the container.

Parameters
row:DataValueDescriptor[]

Doc from org.apache.derby.iapi.store.raw.StreamContainerHandle.fetchNext.

Row to be filled in with information from the record.

Exceptions
StandardException:
Standard exception policy.
getContainerPropertiesback to summary
public void getContainerProperties(Properties prop) throws StandardException

Implements org.apache.derby.iapi.store.raw.StreamContainerHandle.getContainerProperties.

Request the system properties associated with a container.

Parameters
prop:Properties

Property list to fill in.

Exceptions
StandardException:
Standard exception policy.
See Also
StreamContainerHandle#getContainerProperties
getIdback to summary
public ContainerKey getId()

Implements org.apache.derby.iapi.store.raw.StreamContainerHandle.getId.

get the container key for the stream container

getTransactionback to summary
public final RawTransaction getTransaction()

Return the RawTransaction this object was opened in.

removeContainerback to summary
public void removeContainer() throws StandardException

Implements org.apache.derby.iapi.store.raw.StreamContainerHandle.removeContainer.

remove the stream container

Exceptions
StandardException:
Standard Derby error policy
See Also
StreamContainerHandle#removeContainer
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

updateback to summary
public void update(DerbyObservable obj, Object arg)

Implements org.apache.derby.iapi.services.monitor.DerbyObserver.update.

Called when the transaction is about to complete.

Parameters
obj:DerbyObservable

Doc from org.apache.derby.iapi.services.monitor.DerbyObserver.update.

The object which is being observed

arg:Object

Doc from org.apache.derby.iapi.services.monitor.DerbyObserver.update.

Extra information being passed to the callback

See Also
DerbyObserver#update
useContainerback to summary
public boolean useContainer() throws StandardException

Attach me to a container. If this method returns false then I cannot be used anymore, and any reference to me must be discarded.

Exceptions
StandardException:
Standard Derby error policy