Top Description Fields Methods
org.apache.derby.iapi.store.raw.data

public Interface RawContainerHandle

extends ContainerHandle
Known Direct Implementers
org.apache.derby.impl.store.raw.data.BaseContainerHandle
Imports
org.apache.derby.iapi.store.raw.ContainerHandle, .Page, org.apache.derby.iapi.store.raw.log.LogInstant, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.util.ByteArray

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

Modifier and TypeField and Description
public static final int
public static final int
public 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.

Inherited from org.apache.derby.iapi.store.raw.ContainerHandle:
ADD_PAGE_BULKADD_PAGE_DEFAULTDEFAULT_ASSIGN_IDDEFAULT_PAGESIZEDEFAULT_SPARESPACEFIRST_PAGE_NUMBERGET_PAGE_UNFILLEDINVALID_PAGE_NUMBERMODE_BASEROW_INSERT_LOCKEDMODE_CREATE_UNLOGGEDMODE_DEFAULTMODE_DROP_ON_COMMITMODE_FLUSH_ON_COMMITMODE_FORUPDATEMODE_LOCK_NOWAITMODE_LOCK_ROW_NOWAITMODE_NO_ACTIONS_ON_COMMITMODE_OPEN_FOR_LOCK_ONLYMODE_READONLYMODE_SECONDARY_LOCKEDMODE_TEMP_IS_KEPTMODE_TRUNCATE_ON_COMMITMODE_TRUNCATE_ON_ROLLBACKMODE_UNLOGGEDMODE_USE_UPDATE_LOCKSTEMPORARY_SEGMENT

Method Summary

Modifier and TypeMethod and Description
public void
dropContainer(LogInstant instant, boolean drop)

If drop is true, drop the container.

public void
encryptOrDecryptContainer(String
file to store the new version of the container
newFilePath
,
boolean
tells whether to encrypt or decrypt
doEncrypt
)

Creates an encrypted or decrypted version of the container.

public Page
getAnyPage(long pageNumber)

Return a Page that represents any page - alloc page, valid page, free page, dealloced page etc.

public int
getContainerStatus()

Return the status of the container - one of NORMAL, DROPPED, COMMITTED_DROP.

public long
getContainerVersion()

Get the logged container version

public ByteArray
logCreateContainerInfo()

Log all information necessary to recreate the container during a load tran.

public void
preDirty(boolean preDirtyOn)

The container is about to be modified.

public Page
reCreatePageForRedoRecovery(int pageFormat, long pageNumber, long pageOffset)

ReCreate a page for redo recovery.

public void
removeContainer(LogInstant instant)

Remove the container.

Inherited from org.apache.derby.iapi.store.raw.ContainerHandle:
addPageaddPagebackupContainerclosecompactRecordcompressContainerflushContainergetContainerPropertiesgetEstimatedPageCountgetEstimatedRowCountgetFirstPagegetIdgetLockingPolicygetNextPagegetPagegetPageForCompressgetPageForInsertgetPageNoWaitgetReusableRecordIdSequenceNumbergetSpaceInfogetUniqueIdgetUserPageNoWaitgetUserPageWaitisReadOnlyisTemporaryContainermakeRecordHandlepreAllocateremovePagesetEstimatedRowCountsetLockingPolicy

Field Detail

COMMITTED_DROPback to summary
public static final int COMMITTED_DROP
DROPPEDback to summary
public static final int DROPPED
NORMALback to summary
public 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

Method Detail

dropContainerback to summary
public void dropContainer(LogInstant instant, boolean drop) throws StandardException

If drop is true, drop the container. if drop is false, un-drop the container

Exceptions
StandardException:
Standard Derby exception policy
encryptOrDecryptContainerback to summary
public void encryptOrDecryptContainer(String newFilePath, boolean doEncrypt) throws StandardException

Creates an encrypted or decrypted version of the container.

Parameters
newFilePath:String

file to store the new version of the container

doEncrypt:boolean

tells whether to encrypt or decrypt

Exceptions
StandardException:
Standard Derby error policy
getAnyPageback to summary
public Page getAnyPage(long pageNumber) throws StandardException

Return a Page that represents any page - alloc page, valid page, free page, dealloced page etc.

Exceptions
StandardException:
Standard Derby error policy
getContainerStatusback to summary
public int getContainerStatus() throws StandardException

Return the status of the container - one of NORMAL, DROPPED, COMMITTED_DROP.

Exceptions
StandardException:
Standard Derby exception policy
getContainerVersionback to summary
public long getContainerVersion() throws StandardException

Get the logged container version

Exceptions
StandardException:
Standard Derby exception policy
logCreateContainerInfoback to summary
public ByteArray logCreateContainerInfo() throws StandardException

Log all information necessary to recreate the container during a load tran.

Exceptions
StandardException:
Standard Derby error policy
preDirtyback to summary
public 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.

Exceptions
StandardException:
Standard Derby error policy
reCreatePageForRedoRecoveryback to summary
public 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.

Exceptions
StandardException:
Standard Derby error policy
removeContainerback to summary
public void removeContainer(LogInstant instant) throws StandardException

Remove the container.

Exceptions
StandardException:
Standard Derby exception policy