class TempRAFContainer extends RAFContainer
Modifier and Type | Field and Description |
---|---|
protected int |
inUseCount |
fileData, needsSync
allocCache, canUpdate, CHECKSUM_SIZE, CONTAINER_INFO_SIZE, containerCache, containerInfo, containerVersion, dataFactory, estimatedRowCount, FIRST_ALLOC_PAGE_NUMBER, FIRST_ALLOC_PAGE_OFFSET, firstAllocPageNumber, firstAllocPageOffset, formatIdInteger, initialPages, isDirty, lastLogInstant, minimumRecordSize, pageCache, pageSize, preDirty, SPACE_TRACE, spareSpace
identity, isCommittedDrop, isDropped, isReusableRecordId
Constructor and Description |
---|
TempRAFContainer(BaseDataFileFactory factory) |
Modifier and Type | Method and Description |
---|---|
Page |
addPage(BaseContainerHandle handle,
boolean isOverflow)
Add a page without locking the container, only one user will be accessing this
table at a time.
|
Cacheable |
createIdentity(java.lang.Object key,
java.lang.Object createParameter)
Create a new item.
|
(package private) StorageFile |
getFileName(ContainerKey identity,
boolean stub,
boolean errorOK,
boolean tryAlternatePath) |
boolean |
isSingleUser()
Returns true if only a single handle is connected to this container.
|
protected void |
letGo(BaseContainerHandle handle)
Discontinue use of this container.
|
protected int |
preAllocate(long lastPreallocPagenum,
int preAllocSize)
Preallocate page.
|
protected StorageFile |
privGetFileName(ContainerKey identity,
boolean stub,
boolean errorOK,
boolean tryAlternatePath) |
void |
removeContainer(LogInstant instant,
boolean leaveStub)
Remove the container
|
Cacheable |
setIdentity(java.lang.Object key)
Open the container.
|
void |
truncate(BaseContainerHandle handle) |
protected boolean |
use(BaseContainerHandle handle,
boolean forUpdate,
boolean droppedOK)
Lock the container and mark the container as in-use by this container handle.
|
protected void |
writePage(long pageNumber,
byte[] pageData,
boolean syncPage)
Write the page, if it's within range of the current page range of the container.
|
backupContainer, clean, closeContainer, createContainer, encryptOrDecryptContainer, flushAll, getRandomAccessFile, isDirty, openContainer, readPage, removeFile, reopenContainer, run, truncatePages, updatePageArray
bumpContainerVersion, canUpdate, clearIdentity, clearPreallocThreshold, compressContainer, createIdent, deallocatePage, decryptPage, doPreAllocatePages, dropContainer, encryptPage, getAllocPage, getAnyPage, getContainerProperties, getContainerVersion, getContextService, getEmbryonicPage, getEmbryonicPage, getEncryptionBuffer, getEstimatedPageCount, getEstimatedRowCount, getFirstHeadPage, getHeadPage, getLastPageNumber, getLatchedPage, getMinimumRecordSize, getNextHeadPage, getPage, getPageForCompress, getPageForInsert, getPageSize, getReusableRecordIdSequenceNumber, getSpaceInfo, getSpareSpace, getTypeFormatId, incrementReusableRecordIdSequenceNumber, initPage, latchPage, logCreateContainerInfo, newPage, preDirty, prepareForBulkLoad, readHeader, reCreatePageForRedoRecovery, setDirty, setEstimatedRowCount, setIdent, trackUnfilledPage, updateEstimatedRowCount, writeAtOffset, writeHeader, writeHeader
compressContainer, fillInIdentity, getAllocPage, getAnyPage, getCommittedDropState, getContainerId, getContainerStatus, getDeallocLock, getDroppedState, getFirstPage, getIdentity, getNextPage, getSegmentId, isReusableRecordId, lockAttributes, lockerAlwaysCompatible, lockEvent, removePage, requestCompatible, setCommittedDropState, setDroppedState, setReusableRecordIdState, unlockEvent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getIdentity
TempRAFContainer(BaseDataFileFactory factory)
public Cacheable setIdentity(java.lang.Object key) throws StandardException
FileContainer
setIdentity
in interface Cacheable
setIdentity
in class FileContainer
StandardException
- Standard Derby error policyCacheable.setIdentity(java.lang.Object)
public Cacheable createIdentity(java.lang.Object key, java.lang.Object createParameter) throws StandardException
Cacheable
Create a new item and set the identity of the object to represent it.
The object will be in the No Identity state,
ie. it will have just been created or clearIdentity() was just called.
The object must copy the information out of key, not just store a reference to key
if the key is not immutable.
After this call the expression getIdentity().equals(key) must return true.
If the class of the object needs to change (e.g. to support a different format)
then the object should create a new object, call its initParameter() with the parameters
the original object was called with, set its identity and return a reference to it. The cache
manager will discard the reference to the old object.
If an exception is thrown the object must be left in the no-identity state.
MT - single thread required - Method must only be called be cache manager
and the cache manager will guarantee only one thread can be calling it.
createIdentity
in interface Cacheable
createIdentity
in class FileContainer
StandardException
- Standard Derby error policyCacheManager.create(java.lang.Object, java.lang.Object)
public void removeContainer(LogInstant instant, boolean leaveStub) throws StandardException
RAFContainer
removeContainer
in class RAFContainer
leaveStub
- if true, leave a stub. If false, remove everythingStandardException
- Standard Derby error policyRawContainerHandle.removeContainer(org.apache.derby.iapi.store.raw.log.LogInstant)
protected int preAllocate(long lastPreallocPagenum, int preAllocSize)
preAllocate
in class RAFContainer
lastPreallocPagenum
- the last preallocated page number as known
by the allocation pagepreAllocSize
- try to preallocate this page number of pages.
Since only the container knows how many pages are actually on
disk, it may determine that certain number of pages that the
allocation page thinks need to be preallocated is already
allocated, in those case, act as if the preallocation is
successful.protected void writePage(long pageNumber, byte[] pageData, boolean syncPage) throws java.io.IOException, StandardException
writePage
in class RAFContainer
StandardException
- Standard Derby error policyjava.io.IOException
- IO error accessing pageStorageFile getFileName(ContainerKey identity, boolean stub, boolean errorOK, boolean tryAlternatePath)
getFileName
in class RAFContainer
protected StorageFile privGetFileName(ContainerKey identity, boolean stub, boolean errorOK, boolean tryAlternatePath)
privGetFileName
in class RAFContainer
public Page addPage(BaseContainerHandle handle, boolean isOverflow) throws StandardException
addPage
in class BaseContainer
StandardException
- Standard Derby error policypublic void truncate(BaseContainerHandle handle) throws StandardException
truncate
in class BaseContainer
StandardException
- Standard Derby error policyprotected boolean use(BaseContainerHandle handle, boolean forUpdate, boolean droppedOK) throws StandardException
use
in class BaseContainer
droppedOK
- if true, use this container even if it is dropped.,StandardException
- I cannot be opened for update.protected void letGo(BaseContainerHandle handle)
letGo
in class FileContainer
public boolean isSingleUser()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.