org.apache.derby.iapi.store.raw.data
Interface RawContainerHandle

All Superinterfaces:
ContainerHandle
All Known Implementing Classes:
BaseContainerHandle

public interface RawContainerHandle
extends ContainerHandle

RawContainerHandle is the form of ContainerHandle that is used within the raw store. This allows the raw store to have a handle on dropped container without exposing this to the external interface, which is not allowed to get back a handle on a dropped container


Field Summary
static int COMMITTED_DROP
           
static int DROPPED
           
static int NORMAL
          A container can be in 4 states: non_existent - this is represented by a null ContainerHandle NORMAL - this is the normal case, container has been created and is not dropped.
 
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
 
Method Summary
 void dropContainer(LogInstant instant, boolean drop)
          If drop is true, drop the container.
 void encryptContainer(java.lang.String newFilePath)
          Create encrypted version of the container with the user specified encryption properties.
 Page getAnyPage(long pageNumber)
          Return a Page that represents any page - alloc page, valid page, free page, dealloced page etc.
 int getContainerStatus()
          Return the status of the container - one of NORMAL, DROPPED, COMMITTED_DROP.
 long getContainerVersion()
          Get the logged container version
 ByteArray logCreateContainerInfo()
          Log all information necessary to recreate the container during a load tran.
 void preDirty(boolean preDirtyOn)
          The container is about to be modified.
 Page reCreatePageForRedoRecovery(int pageFormat, long pageNumber, long pageOffset)
          ReCreate a page for redo recovery.
 void removeContainer(LogInstant instant)
          Remove the container.
 
Methods inherited from interface org.apache.derby.iapi.store.raw.ContainerHandle
addPage, addPage, backupContainer, close, compactRecord, compressContainer, flushContainer, getContainerProperties, getEstimatedPageCount, getEstimatedRowCount, getFirstPage, getId, getLockingPolicy, getNextPage, getPage, getPageForCompress, getPageForInsert, getPageNoWait, getReusableRecordIdSequenceNumber, getSpaceInfo, getUniqueId, getUserPageNoWait, getUserPageWait, isReadOnly, isTemporaryContainer, makeRecordHandle, preAllocate, removePage, setEstimatedRowCount, setLockingPolicy
 

Field Detail

NORMAL

static final int NORMAL
A container can be in 4 states: non_existent - this is represented by a null ContainerHandle NORMAL - this is the normal case, container has been created and is not dropped. DROPPED - container has been dropped, but is not known whether the drop has been committed or not COMMITTED_DROP - container has been dropped and has committed. To everyone else except recovery, this state is equivalent to NON_EXISTENT

See Also:
Constant Field Values

DROPPED

static final int DROPPED
See Also:
Constant Field Values

COMMITTED_DROP

static final int COMMITTED_DROP
See Also:
Constant Field Values
Method Detail

getContainerStatus

int getContainerStatus()
                       throws StandardException
Return the status of the container - one of NORMAL, DROPPED, COMMITTED_DROP.

Throws:
StandardException - Standard Derby exception policy

removeContainer

void removeContainer(LogInstant instant)
                     throws StandardException
Remove the container.

Throws:
StandardException - Standard Derby exception policy

dropContainer

void dropContainer(LogInstant instant,
                   boolean drop)
                   throws StandardException
If drop is true, drop the container. if drop is false, un-drop the container

Throws:
StandardException - Standard Derby exception policy

getContainerVersion

long getContainerVersion()
                         throws StandardException
Get the logged container version

Throws:
StandardException - Standard Derby exception policy

getAnyPage

Page getAnyPage(long pageNumber)
                throws StandardException
Return a Page that represents any page - alloc page, valid page, free page, dealloced page etc.

Throws:
StandardException - Standard Derby error policy

reCreatePageForRedoRecovery

Page reCreatePageForRedoRecovery(int pageFormat,
                                 long pageNumber,
                                 long pageOffset)
                                 throws StandardException
ReCreate a page for redo recovery. Used during redo recovery while trying to apply log records which are creating the page.

Throws:
StandardException - Standard Derby error policy

logCreateContainerInfo

ByteArray logCreateContainerInfo()
                                 throws StandardException
Log all information necessary to recreate the container during a load tran.

Throws:
StandardException - Standard Derby error policy

preDirty

void preDirty(boolean preDirtyOn)
              throws 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.

Throws:
StandardException - Standard Derby error policy

encryptContainer

void encryptContainer(java.lang.String newFilePath)
                      throws StandardException
Create encrypted version of the container with the user specified encryption properties.

Parameters:
newFilePath - file to store the new encrypted version of the container
Throws:
StandardException - Standard Derby error policy

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.