Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.store.raw.data
Class BaseContainerHandle  view BaseContainerHandle download BaseContainerHandle.java

java.lang.Object
  extended byjava.util.Observable
      extended byorg.apache.derby.impl.store.raw.data.BaseContainerHandle
All Implemented Interfaces:
org.apache.derby.iapi.store.raw.ContainerHandle, java.util.Observer, org.apache.derby.iapi.store.raw.data.RawContainerHandle

public class BaseContainerHandle
extends java.util.Observable
implements org.apache.derby.iapi.store.raw.data.RawContainerHandle, java.util.Observer

A handle to an open container, implememts RawContainerHandle.

This class is an Observer to observe RawTransactions and is also a Observable to handle the list of pages accessed thorough this handle.
This class implements Lockable (defined to be ContainerHandle) and is the object used to logically lock the container.
MT - Mutable - Immutable identity - Thread Aware


Field Summary
protected  PageActions actionsSet
           
protected  boolean active
          Is this ContainerHandle active.
protected  AllocationActions allocActionsSet
           
protected  BaseContainer container
          The actual container we are accessing.
private  boolean forUpdate
          are we going to update?
MT - Immutable after container handle becomes active
protected  org.apache.derby.iapi.store.raw.ContainerKey identity
          Container identifier
MT - Immutable
private  org.apache.derby.iapi.store.raw.LockingPolicy locking
          the locking policy we opened the container with.
protected  int mode
           
protected  org.apache.derby.iapi.store.raw.xact.RawTransaction xact
          our transaction.
 
Fields inherited from class java.util.Observable
 
Fields inherited from interface org.apache.derby.iapi.store.raw.data.RawContainerHandle
COMMITTED_DROP, DROPPED, NORMAL
 
Fields inherited from interface org.apache.derby.iapi.store.raw.ContainerHandle
ADD_PAGE_BULK, ADD_PAGE_DEFAULT, DEFAULT_ASSIGN_ID, DEFAULT_PAGESIZE, DEFAULT_SPARESPACE, FIRST_PAGE_NUMBER, GET_PAGE_UNFILLED, INVALID_PAGE_NUMBER, MODE_BASEROW_INSERT_LOCKED, MODE_CREATE_UNLOGGED, MODE_DEFAULT, MODE_DROP_ON_COMMIT, MODE_FLUSH_ON_COMMIT, MODE_FORUPDATE, MODE_LOCK_NOWAIT, MODE_NO_ACTIONS_ON_COMMIT, MODE_OPEN_FOR_LOCK_ONLY, MODE_READONLY, MODE_SECONDARY_LOCKED, MODE_TEMP_IS_KEPT, MODE_TRUNCATE_ON_COMMIT, MODE_TRUNCATE_ON_ROLLBACK, MODE_UNLOGGED, MODE_USE_UPDATE_LOCKS, TEMPORARY_SEGMENT
 
Constructor Summary
BaseContainerHandle(org.apache.derby.catalog.UUID rawStoreId, org.apache.derby.iapi.store.raw.xact.RawTransaction xact, org.apache.derby.iapi.store.raw.ContainerKey identity, org.apache.derby.iapi.store.raw.LockingPolicy locking, int mode)
          Create an object that is only used for locking the container.
BaseContainerHandle(org.apache.derby.catalog.UUID rawStoreId, org.apache.derby.iapi.store.raw.xact.RawTransaction xact, PageActions actionsSet, AllocationActions allocActionsSet, org.apache.derby.iapi.store.raw.LockingPolicy locking, BaseContainer container, int mode)
          Create a container handle that is used to actually access the container.
 
Method Summary
 org.apache.derby.iapi.store.raw.Page addPage()
          Add a page to the container The page returned will be observing me.
 org.apache.derby.iapi.store.raw.Page addPage(int flag)
          Add a page to the container, if flag == ContainerHandle.ADD_PAGE_BULK, tell the container about it.
protected  void checkOpen()
           
private  void checkUpdateOpen()
           
 void close()
          Close me.
 void compactRecord(org.apache.derby.iapi.store.raw.RecordHandle record)
          This record probably has shrunk considerably.
 void compressContainer()
          Release free space to the OS.
 void dropContainer(org.apache.derby.iapi.store.raw.log.LogInstant instant, boolean drop)
          If drop is true, drop the container.
 void flushContainer()
          Flush all dirty pages of the container to disk.
 PageActions getActionSet()
           
 AllocationActions getAllocationActionSet()
           
 org.apache.derby.iapi.store.raw.Page getAllocPage(long pageNumber)
           
 org.apache.derby.iapi.store.raw.Page getAnyPage(long pageNumber)
          Get this page with no check - any page type or status is fine.
 void getContainerProperties(java.util.Properties prop)
          Request the system properties associated with a container.
 int getContainerStatus()
          Get the container status.
 long getContainerVersion()
          Get the logged container version
 long getEstimatedPageCount(int flag)
          Get the total estimated number of allocated (not freed, not deallocated) user pages in the container, including overflow pages.
 long getEstimatedRowCount(int flag)
          Get the total estimated number of rows in the container, not including overflow rows.
 org.apache.derby.iapi.store.raw.Page getFirstPage()
          Obtain exclusive access to the current first page of the container.
 org.apache.derby.iapi.store.raw.ContainerKey getId()
          Return my identifier.
 org.apache.derby.iapi.store.raw.LockingPolicy getLockingPolicy()
          Return my locking policy, may be different from the Transaction's default locking policy.
 int getMode()
          Get the mode I was opened with.
 org.apache.derby.iapi.store.raw.Page getNextPage(long pageNumber)
          Obtain exclusive access to the next valid page of the given page number in the container.
 org.apache.derby.iapi.store.raw.Page getPage(long pageNumber)
          Obtain exclusive access to the page with the given page number.
 org.apache.derby.iapi.store.raw.Page getPageForCompress(int flag, long pageno)
           
 org.apache.derby.iapi.store.raw.Page getPageForInsert(int flag)
          Get a page for insert.
 org.apache.derby.iapi.store.raw.Page getPageNoWait(long pageNumber)
          Identical to getPage but returns null immediately if the desired page is already latched by another Container.
 org.apache.derby.iapi.store.access.SpaceInfo getSpaceInfo()
          Get information about space used by the container.
 org.apache.derby.iapi.store.raw.xact.RawTransaction getTransaction()
          Return the RawTransaction I was opened in.
 java.lang.Object getUniqueId()
          Return my unique identifier, this identifier will be unique to each instance of an open container handle.
 org.apache.derby.iapi.store.raw.Page getUserPageNoWait(long pageNumber)
          Obtain exclusive access to the page with the given page number.
 org.apache.derby.iapi.store.raw.Page getUserPageWait(long pageNumber)
          Obtain exclusive access to the page with the given page number.
protected  void informObservers()
           
 boolean isReadOnly()
          Is the container opened for read only or update?
 boolean isTemporaryContainer()
          Return true if this containerHandle refers to a temporary container.
 org.apache.derby.iapi.util.ByteArray logCreateContainerInfo()
          Log all information necessary to recreate the container during a load tran.
 org.apache.derby.iapi.store.raw.RecordHandle makeRecordHandle(long pageNumber, int recordId)
          Return a record handle that is initialized to the given page number and record id.
 void preAllocate(int numPage)
          Preallocate numPage if possible.
 void preDirty(boolean preDirtyOn)
          The container is about to be modified.
 org.apache.derby.iapi.store.raw.Page reCreatePageForLoadTran(int pageFormat, long pageNumber, long pageOffset)
          Re-create this page for load tran.
 void removeContainer(org.apache.derby.iapi.store.raw.log.LogInstant instant)
          remove the container
 void removePage(org.apache.derby.iapi.store.raw.Page page)
          Remove a page from the container.
 void setEstimatedRowCount(long count, int flag)
          Set the total estimated number of rows in the container.
 void setLockingPolicy(org.apache.derby.iapi.store.raw.LockingPolicy newLockingPolicy)
          Set the locking policy for this open container
 java.lang.String toString()
          Convert this Object to a human-readable String.
 void update(java.util.Observable obj, java.lang.Object arg)
          Called when the transaction is about to complete.
 boolean updateOK()
          Was I opened for updates?
 boolean useContainer(boolean droppedOK, boolean waitForLock)
          Attach me to a container.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

identity

protected org.apache.derby.iapi.store.raw.ContainerKey identity
Container identifier
MT - Immutable


active

protected boolean active
Is this ContainerHandle active.
MT - Mutable : scoped


container

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


locking

private org.apache.derby.iapi.store.raw.LockingPolicy locking
the locking policy we opened the container with. Only valid when active is true.
MT - Mutable : scoped


xact

protected org.apache.derby.iapi.store.raw.xact.RawTransaction xact
our transaction. Only valid when active is true.
MT - Mutable : scoped


forUpdate

private boolean forUpdate
are we going to update?
MT - Immutable after container handle becomes active


mode

protected int mode

actionsSet

protected PageActions actionsSet

allocActionsSet

protected AllocationActions allocActionsSet
Constructor Detail

BaseContainerHandle

public BaseContainerHandle(org.apache.derby.catalog.UUID rawStoreId,
                           org.apache.derby.iapi.store.raw.xact.RawTransaction xact,
                           org.apache.derby.iapi.store.raw.ContainerKey identity,
                           org.apache.derby.iapi.store.raw.LockingPolicy locking,
                           int mode)
Create an object that is only used for locking the container.


BaseContainerHandle

public BaseContainerHandle(org.apache.derby.catalog.UUID rawStoreId,
                           org.apache.derby.iapi.store.raw.xact.RawTransaction xact,
                           PageActions actionsSet,
                           AllocationActions allocActionsSet,
                           org.apache.derby.iapi.store.raw.LockingPolicy locking,
                           BaseContainer container,
                           int mode)
Create a container handle that is used to actually access the container.

Method Detail

addPage

public org.apache.derby.iapi.store.raw.Page addPage()
                                             throws org.apache.derby.iapi.error.StandardException
Add a page to the container The page returned will be observing me.

Specified by:
addPage in interface org.apache.derby.iapi.store.raw.ContainerHandle

compressContainer

public void compressContainer()
                       throws org.apache.derby.iapi.error.StandardException
Release free space to the OS.

As is possible release any free space to the operating system. This will usually mean releasing any free pages located at the end of the file using the java truncate() interface.

Specified by:
compressContainer in interface org.apache.derby.iapi.store.raw.ContainerHandle

addPage

public org.apache.derby.iapi.store.raw.Page addPage(int flag)
                                             throws org.apache.derby.iapi.error.StandardException
Add a page to the container, if flag == ContainerHandle.ADD_PAGE_BULK, tell the container about it. The page returned will be observing me.

Specified by:
addPage in interface org.apache.derby.iapi.store.raw.ContainerHandle

preAllocate

public void preAllocate(int numPage)
Preallocate numPage if possible.

Specified by:
preAllocate in interface org.apache.derby.iapi.store.raw.ContainerHandle

getContainerProperties

public void getContainerProperties(java.util.Properties prop)
                            throws org.apache.derby.iapi.error.StandardException
Request the system properties associated with a container.

Request the value of properties that are associated with a container. The following properties can be requested: derby.storage.pageSize derby.storage.pageReservedSpace derby.storage.minimumRecordSize

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(BaseContainerHandle ch) { Properties prop = new Properties(); prop.put("derby.storage.pageSize", ""); ch.getContainerProperties(prop); System.out.println( "conatainer's page size = " + prop.getProperty("derby.storage.pageSize"); }

Specified by:
getContainerProperties in interface org.apache.derby.iapi.store.raw.ContainerHandle

removePage

public void removePage(org.apache.derby.iapi.store.raw.Page page)
                throws org.apache.derby.iapi.error.StandardException
Remove a page from the container.

Specified by:
removePage in interface org.apache.derby.iapi.store.raw.ContainerHandle

getPage

public org.apache.derby.iapi.store.raw.Page getPage(long pageNumber)
                                             throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Obtain exclusive access to the page with the given page number. Once the Page is no longer required the Page's unlatch() method must be called.

The Page object is guaranteed to remain in-memory and exclusive to the caller until its unlatch() method is called.

Specified by:
getPage in interface org.apache.derby.iapi.store.raw.ContainerHandle

getAllocPage

public org.apache.derby.iapi.store.raw.Page getAllocPage(long pageNumber)
                                                  throws org.apache.derby.iapi.error.StandardException

getUserPageNoWait

public org.apache.derby.iapi.store.raw.Page getUserPageNoWait(long pageNumber)
                                                       throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Obtain exclusive access to the page with the given page number. Will only return a valid, non-overflow user page - so can be used by routines in post commit to get pages to attempt deleted row space reclamation. If for some reason a request is made for an overflow page a null will be returned. Once the Page is no longer required the Page's unlatch() method must be called.

The Page object is guaranteed to remain in-memory and exclusive to the caller until its unlatch() method is called.

Specified by:
getUserPageNoWait in interface org.apache.derby.iapi.store.raw.ContainerHandle

getUserPageWait

public org.apache.derby.iapi.store.raw.Page getUserPageWait(long pageNumber)
                                                     throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Obtain exclusive access to the page with the given page number. Will only return a valid, non-overflow user page - so can be used by routines in post commit to get pages to attempt deleted row space reclamation. If for some reason a request is made for an overflow page a null will be returned. Once the Page is no longer required the Page's unlatch() method must be called.

The Page object is guaranteed to remain in-memory and exclusive to the caller until its unlatch() method is called.

Specified by:
getUserPageWait in interface org.apache.derby.iapi.store.raw.ContainerHandle

getPageNoWait

public org.apache.derby.iapi.store.raw.Page getPageNoWait(long pageNumber)
                                                   throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Identical to getPage but returns null immediately if the desired page is already latched by another Container.

Specified by:
getPageNoWait in interface org.apache.derby.iapi.store.raw.ContainerHandle

getFirstPage

public org.apache.derby.iapi.store.raw.Page getFirstPage()
                                                  throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Obtain exclusive access to the current first page of the container. Only a valid, non overflow page will be returned. Pages in the container are ordered in an internally defined ordering.

Note that once this method returns this page may no longer be the first page of the container. I.e, other threads may allocate pages prior to this page number while this page is latched. It is up to the caller of this routine to synchronize this call with addPage to assure that this is the first page.
As long as the client provide the necessary lock to ensure that no addPage is called, then this page is guaranteed to be the first page of the container in some internally defined ordering of the pages.

Specified by:
getFirstPage in interface org.apache.derby.iapi.store.raw.ContainerHandle

getNextPage

public org.apache.derby.iapi.store.raw.Page getNextPage(long pageNumber)
                                                 throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Obtain exclusive access to the next valid page of the given page number in the container. Only a valid, non overflow page will be returned. Pages in the container are ordered in an internally defined ordering.

Note that once this method returns this page may no longer be the next page of the container. I.e, other threads may allocate pages prior to this page number while this page is latched. It is up to the caller of this routine to synchronize this call with addPage to assure that this is the first page.
As long as the client provide the necessary lock to ensure that no addPage is called, then this page is guaranteed to be the next page of the container in some internally defined ordering of the pages.
If no pages are added or removed, then an iteration such as:

                for (Page p = containerHandle.getFirstPage();
                         p != null;
                         p = containerHandle.getNextPage(p.getPageNumber()))
                
                will guarentee to iterate thru and latched all the valid pages 
                in the container

Specified by:
getNextPage in interface org.apache.derby.iapi.store.raw.ContainerHandle

getPageForInsert

public org.apache.derby.iapi.store.raw.Page getPageForInsert(int flag)
                                                      throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Get a page for insert. If RawStore thinks it knows where a potentially suitable page is for insert, it will return it. If RawStore doesn't know where a suitable page for insert is, or if there are no allocated page, then null is returned. If a page is returned, it will be a valid, non-overflow page. A potentially suitable page is one which has enough space for a minium sized record.

Specified by:
getPageForInsert in interface org.apache.derby.iapi.store.raw.ContainerHandle

getPageForCompress

public org.apache.derby.iapi.store.raw.Page getPageForCompress(int flag,
                                                               long pageno)
                                                        throws org.apache.derby.iapi.error.StandardException
Specified by:
getPageForCompress in interface org.apache.derby.iapi.store.raw.ContainerHandle

isReadOnly

public final boolean isReadOnly()
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Is the container opened for read only or update?

Specified by:
isReadOnly in interface org.apache.derby.iapi.store.raw.ContainerHandle

close

public void close()
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
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.
Any pages that were obtained using me and have not been released using Page's unlatch method are released, and references to them must be thrown away.

Specified by:
close in interface org.apache.derby.iapi.store.raw.ContainerHandle

getEstimatedRowCount

public long getEstimatedRowCount(int flag)
                          throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Get the total estimated number of rows in the container, not including overflow rows. This number is a rough estimate and may be grossly off.

Specified by:
getEstimatedRowCount in interface org.apache.derby.iapi.store.raw.ContainerHandle

setEstimatedRowCount

public void setEstimatedRowCount(long count,
                                 int flag)
                          throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Set the total estimated number of rows in the container. Often, after a scan, the client of RawStore has a much better estimate of the number of rows in the container then what RawStore has. Use this better number for future reference.
It is OK for a ReadOnly ContainerHandle to set the estimated row count.

Specified by:
setEstimatedRowCount in interface org.apache.derby.iapi.store.raw.ContainerHandle

getEstimatedPageCount

public long getEstimatedPageCount(int flag)
                           throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Get the total estimated number of allocated (not freed, not deallocated) user pages in the container, including overflow pages. this number is a rough estimate and may be grossly off.

Specified by:
getEstimatedPageCount in interface org.apache.derby.iapi.store.raw.ContainerHandle

flushContainer

public void flushContainer()
                    throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Flush all dirty pages of the container to disk. Used mainly for UNLOGGED or CREATE_UNLOGGED operation.

Specified by:
flushContainer in interface org.apache.derby.iapi.store.raw.ContainerHandle

compactRecord

public void compactRecord(org.apache.derby.iapi.store.raw.RecordHandle record)
                   throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
This record probably has shrunk considerably. Free its reserved space or compact it.

Specified by:
compactRecord in interface org.apache.derby.iapi.store.raw.ContainerHandle

getContainerStatus

public int getContainerStatus()
                       throws org.apache.derby.iapi.error.StandardException
Get the container status.

Specified by:
getContainerStatus in interface org.apache.derby.iapi.store.raw.data.RawContainerHandle

removeContainer

public void removeContainer(org.apache.derby.iapi.store.raw.log.LogInstant instant)
                     throws org.apache.derby.iapi.error.StandardException
remove the container

Specified by:
removeContainer in interface org.apache.derby.iapi.store.raw.data.RawContainerHandle

getId

public org.apache.derby.iapi.store.raw.ContainerKey getId()
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Return my identifier.

Specified by:
getId in interface org.apache.derby.iapi.store.raw.ContainerHandle

getUniqueId

public java.lang.Object getUniqueId()
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Return my unique identifier, this identifier will be unique to each instance of an open container handle. This id is used by the locking system to group locks to an open container handle.

Specified by:
getUniqueId in interface org.apache.derby.iapi.store.raw.ContainerHandle

dropContainer

public void dropContainer(org.apache.derby.iapi.store.raw.log.LogInstant instant,
                          boolean drop)
                   throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.data.RawContainerHandle
If drop is true, drop the container. if drop is false, un-drop the container

Specified by:
dropContainer in interface org.apache.derby.iapi.store.raw.data.RawContainerHandle

getContainerVersion

public long getContainerVersion()
                         throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.data.RawContainerHandle
Get the logged container version

Specified by:
getContainerVersion in interface org.apache.derby.iapi.store.raw.data.RawContainerHandle

getAnyPage

public org.apache.derby.iapi.store.raw.Page getAnyPage(long pageNumber)
                                                throws org.apache.derby.iapi.error.StandardException
Get this page with no check - any page type or status is fine. Caller must be prepared to handle freed, deallocated,or alloc page Called by recovery ONLY.

Specified by:
getAnyPage in interface org.apache.derby.iapi.store.raw.data.RawContainerHandle

reCreatePageForLoadTran

public org.apache.derby.iapi.store.raw.Page reCreatePageForLoadTran(int pageFormat,
                                                                    long pageNumber,
                                                                    long pageOffset)
                                                             throws org.apache.derby.iapi.error.StandardException
Re-create this page for load tran. Called by recovery redo ONLY

Specified by:
reCreatePageForLoadTran in interface org.apache.derby.iapi.store.raw.data.RawContainerHandle

logCreateContainerInfo

public org.apache.derby.iapi.util.ByteArray logCreateContainerInfo()
                                                            throws org.apache.derby.iapi.error.StandardException
Log all information necessary to recreate the container during a load tran.

Specified by:
logCreateContainerInfo in interface org.apache.derby.iapi.store.raw.data.RawContainerHandle

makeRecordHandle

public org.apache.derby.iapi.store.raw.RecordHandle makeRecordHandle(long pageNumber,
                                                                     int recordId)
                                                              throws org.apache.derby.iapi.error.StandardException
Return a record handle that is initialized to the given page number and record id.

Specified by:
makeRecordHandle in interface org.apache.derby.iapi.store.raw.ContainerHandle

update

public void update(java.util.Observable obj,
                   java.lang.Object arg)
Called when the transaction is about to complete.

Specified by:
update in interface java.util.Observer

getActionSet

public PageActions getActionSet()

getAllocationActionSet

public AllocationActions getAllocationActionSet()

useContainer

public boolean useContainer(boolean droppedOK,
                            boolean waitForLock)
                     throws org.apache.derby.iapi.error.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.


getTransaction

public final org.apache.derby.iapi.store.raw.xact.RawTransaction getTransaction()
Return the RawTransaction I was opened in.


getLockingPolicy

public final org.apache.derby.iapi.store.raw.LockingPolicy getLockingPolicy()
Return my locking policy, may be different from the Transaction's default locking policy.

Specified by:
getLockingPolicy in interface org.apache.derby.iapi.store.raw.ContainerHandle

setLockingPolicy

public final void setLockingPolicy(org.apache.derby.iapi.store.raw.LockingPolicy newLockingPolicy)
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Set the locking policy for this open container

Specified by:
setLockingPolicy in interface org.apache.derby.iapi.store.raw.ContainerHandle

updateOK

public final boolean updateOK()
Was I opened for updates?


MT - thread safe


getMode

public int getMode()
Get the mode I was opened with.


preDirty

public void preDirty(boolean preDirtyOn)
              throws org.apache.derby.iapi.error.StandardException
The container is about to be modified. Loggable actions use this to make sure the container gets cleaned if a checkpoint is taken after any log record is sent to the log stream but before the container is actually dirtied.

Specified by:
preDirty in interface org.apache.derby.iapi.store.raw.data.RawContainerHandle

isTemporaryContainer

public boolean isTemporaryContainer()
                             throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.store.raw.ContainerHandle
Return true if this containerHandle refers to a temporary container.

Specified by:
isTemporaryContainer in interface org.apache.derby.iapi.store.raw.ContainerHandle

checkOpen

protected void checkOpen()
                  throws org.apache.derby.iapi.error.StandardException

checkUpdateOpen

private void checkUpdateOpen()
                      throws org.apache.derby.iapi.error.StandardException

informObservers

protected void informObservers()

getSpaceInfo

public org.apache.derby.iapi.store.access.SpaceInfo getSpaceInfo()
                                                          throws org.apache.derby.iapi.error.StandardException
Get information about space used by the container.

Specified by:
getSpaceInfo in interface org.apache.derby.iapi.store.raw.ContainerHandle

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).