| Modifier and Type | Field and Description |
|---|---|
| protected AllocationCache | |
| private boolean | |
| protected boolean | |
| private CRC32 | |
| protected static final int | |
| private static final int | CONTAINER_FORMAT_ID_SIZE
the container format must fit in this many bytes |
| protected static final int | CONTAINER_INFO_SIZE
The size of the persistently stored container info ContainerHeader contains the following information: 4 bytes int FormatId 4 bytes int status 4 bytes int pageSize 4 bytes int spareSpace 4 bytes int minimumRecordSize 2 bytes short initialPages 2 bytes short spare1 8 bytes long first Allocation page number 8 bytes long first Allocation page offset 8 bytes long container version 8 bytes long estimated number of rows 8 bytes long reusable recordId sequence number 8 bytes long spare3 8 bytes long checksum container info size is 80 bytes, with 10 bytes of spare space |
| protected final CacheManager | |
| pack-priv byte[] | |
| protected long | |
| protected final BaseDataFileFactory | |
| private static final int | |
| private byte[] | |
| private long | estimatedPageCount
An estimated page count. |
| protected long | |
| private static final int | |
| private static final int | |
| private static final int | |
| public static final long | FIRST_ALLOC_PAGE_NUMBER
where the first alloc page is located - the logical page number and the physical page offset NOTE if it is not 0 this is not going to work for Stream file which doesn't support seek |
| public static final long | |
| protected long | |
| protected long | |
| protected static final int | |
| protected short | |
| protected boolean | |
| private long | lastAllocatedPage
The last allocated page. |
| private long[] | lastInsertedPage
The page that was last inserted into. |
| private int | |
| protected LogInstant | |
| private long | lastUnfilledPage
The last unfilled page found. |
| private static final int | |
| private static final int | |
| protected int | |
| protected final CacheManager | |
| protected int | |
| private static final int | |
| private int | |
| private int | |
| protected boolean | |
| private long | reusableRecordIdSequenceNumber
The sequence number for reusable recordIds . |
| protected static final String | |
| protected int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | backupContainer(BaseContainerHandle
the container handle. handle, String location of the backup container. backupLocation)Implements abstract org. backup the container. |
| protected final void | |
| protected boolean | canUpdate()
Implements abstract org. Can the container be updated. |
| public void | clearIdentity()
Overrides org. Implements org. Put the object into the No Identity state. |
| protected void | clearPreallocThreshold()
Implements abstract org. The container will have no pre-allocate threshold, i.e., if the implementation supports it, page preallocation will happen the next time a new page is allocated. |
| pack-priv abstract void | |
| protected void | compressContainer(RawTransaction
- the nested top transaction for the purpose of freeing space.
If ntt is null, use the user transaction for allocation.
#param allocHandle - the container handle opened by the ntt,
use this to latch the alloc page ntt, BaseContainerHandle allocHandle)Implements abstract org. Compress free space from container. |
| pack-priv abstract void | |
| protected Cacheable | |
| public Cacheable | createIdentity(Object
The handle on the cacheable key, Object Creation details createParameter)Implements org. Create a new item. |
| private void | createInfoFromLog(ByteArray byteArray)
Set container properties from the passed in ByteArray, which is created by logCreateContainerInfo. |
| private void | |
| protected void | deallocatePage(BaseContainerHandle
the container handle doing the deallocation handle, BasePage the page to be deallocated. It is latched upon entry and
will be unlatched by the caller of this function page)Implements abstract org. Deallocate a page from the container. |
| private void | |
| protected void | |
| protected int | doPreAllocatePages(long lastPreallocPagenum, int preAllocSize)
Preallocate the pages - actually doing it, called by subclass only |
| protected void | dropContainer(LogInstant instant, boolean isDropped)
Implements abstract org. Drop Container. |
| protected byte[] | encryptPage(byte[] pageData, int pageSize, byte[] encryptionBuffer, boolean newEngine)
Encrypts a page. |
| private AllocPage | |
| private AllocPage | findLastAllocPage(BaseContainerHandle handle, RawTransaction tran)
Find the last alloc page, returns null if no alloc page is found |
| protected BasePage | getAllocPage(long pageNumber)
Implements abstract org. Get an alloc page - only accessible to the raw store (container and recovery) |
| protected BasePage | getAnyPage(BaseContainerHandle handle, long pageNumber)
Implements abstract org. Get any old page - turn off all validation |
| public void | getContainerProperties(Properties
Property list to fill in. prop)Implements abstract org. Request the system properties associated with a container. |
| protected long | getContainerVersion()
Implements abstract org. Get the logged container version. |
| pack-priv static ContextService | getContextService()
Must be limited to package visibility so that user code can't call this entry point. |
| protected byte[] | |
| pack-priv byte[] | Returns: a byte array containing the embryonic pagethe file to read from file, long where to start reading (normally
offset)FileContainer.FIRST_ALLOC_PAGE_OFFSET)Read an embryonic page (that is, a section of the first alloc page that
is so large that we know all the borrowed space is included in it) from
the specified offset in a |
| protected byte[] | |
| public long | getEstimatedPageCount(BaseContainerHandle handle, int flag)
Implements abstract org.
|
| public long | getEstimatedRowCount(int flag)
Implements abstract org. MT - this routine is NOT MT-safe and clients don't need to provide synchronization. |
| protected BasePage | getFirstHeadPage(BaseContainerHandle handle, boolean wait)
Implements abstract org. Get the first valid page in the container |
| protected BasePage | getHeadPage(BaseContainerHandle handle, long pageNumber, boolean wait)
Implements abstract org. Get only a valid, non-overflow page. |
| private BasePage | |
| private synchronized long | |
| protected long | |
| private synchronized long | |
| protected BasePage | Returns: the latched pagethe container handle used to latch the page handle, long the page number of the page to get pageNumber)Get a latched page. |
| protected int | |
| protected BasePage | getNextHeadPage(BaseContainerHandle handle, long pageNumber, boolean wait)
Implements abstract org. Get the next page in the container. |
| protected BasePage | getPage(BaseContainerHandle handle, long pageNumber, boolean wait)
Implements abstract org. Get a valid (non-deallocated or free) page in the container. |
| protected BasePage | getPageForCompress(BaseContainerHandle handle, int flag, long pageno)
Implements abstract org. Get candidate page to move a row for compressing the table. |
| protected BasePage | getPageForInsert(BaseContainerHandle handle, int flag)
Implements abstract org. Get a potentially suitable page for insert and latch it. |
| protected int | |
| public final long | Returns: reusable RecordId sequence number for the container.Implements abstract org. Get the reusable RecordId sequence number for the container. |
| private static Object | getServiceModule(final Object serviceModule, final String factoryInterface)
Must be private so that user code can't call this entry point. |
| public SpaceInfo | getSpaceInfo(BaseContainerHandle handle)
Implements abstract org. Get information about space used by the container. |
| protected int | |
| public int | getTypeFormatId()
Implements org. Return my format identifier. |
| private long | |
| private BasePage | Returns: the latched pageMT - thread safe the container handle handle, long the page number of the page to get pageNumber, boolean if true then an overflow page is OK,
if false, then only non-overflow page is OK overflowOK, boolean if true then wait for a latch wait)Get a page in the container. |
| protected final void | incrementReusableRecordIdSequenceNumber()
Implements abstract org. Increment the reusable RecordId version sequence number. |
| private void | |
| private synchronized void | |
| protected BasePage | Returns: a latched page that has been initialized.the contianer handle to initialize the page with - the ntt allochandle, PageKey the page number of the page to be initialized pkey, PageCreationArgs the arguments for page creation createArgs, long pageOffset, boolean is true if we are reusing a page that has
already been initialized once reuse, boolean overflow)Initialize a page |
| public boolean | isDirty()
Implements org. We treat this container as dirty if it has the container file open. |
| protected BasePage | latchPage(BaseContainerHandle handle, BasePage foundPage, boolean wait)
Overrides org.
|
| protected void | letGo(BaseContainerHandle handle)
Overrides org. The container is kept by the find() in File.openContainer. |
| protected ByteArray | logCreateContainerInfo()
Implements abstract org. Log all information on the container creation necessary to recreate the container during a load tran. |
| private AllocPage | makeAllocPage(RawTransaction ntt, BaseContainerHandle handle, long pageNumber, long pageOffset, int containerInfoSize)
|
| protected BasePage | newPage(BaseContainerHandle
- the container handle opened by the user transaction,
use this to latch the new user page userHandle, RawTransaction - the nested top transaction for the purpose of allocating the new page
If ntt is null, use the user transaction for allocation.
#param allocHandle - the container handle opened by the ntt,
use this to latch the alloc page ntt, BaseContainerHandle allocHandle, boolean isOverflow)Implements abstract org. Create a new page in the container. |
| pack-priv abstract boolean | |
| private boolean | |
| protected abstract int | Returns: number of successfully preallocated page, or 0 if no page has been preallocatedthe last preallocated page number as known
by the allocation page lastPreallocPagenum, int 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. preAllocSize)preAllocate writes out the preallocated pages to disk if necessary. |
| public void | preDirty(boolean preDirtyOn)
Implements abstract org. The container is about to be modified. |
| protected void | prepareForBulkLoad(BaseContainerHandle handle, int numPage)
Implements abstract org. The container will be grown vastly, prepare for it. |
| protected void | |
| private void | readHeaderFromArray(byte[] a)
Read containerInfo from a byte array The container Header array must be written by or of the same format as put together by writeHeaderFromArray. |
| protected abstract void | |
| protected BasePage | reCreatePageForRedoRecovery(BaseContainerHandle handle, int pageFormat, long pageNumber, long pageOffset)
Implements abstract org. ReCreate a page for rollforward recovery. |
| protected void | |
| public void | setEstimatedRowCount(long count, int flag)
Implements abstract org.
|
| protected Cacheable | |
| public Cacheable | Returns: a valid object if the container was successfully opened, null if it does not exist.The handle on the cacheable key)Implements org. Open the container. |
| private synchronized void | |
| private synchronized void | |
| private synchronized void | |
| protected void | |
| protected void | |
| pack-priv void | writeAtOffset(StorageRandomAccessFile
the file to write to file, byte[] the bytes to write bytes, long the offset to start writing at offset)Write a sequence of bytes at the given offset in a file. |
| protected void | writeHeader(Object identity, byte[] pageData)
Write the container header to a page array (the first allocation page) |
| protected void | writeHeader(Object identity, StorageRandomAccessFile file, boolean create, byte[] epage)
Write the container header directly to file. |
| private void | writeHeaderToArray(byte[] a)
Write containerInfo into a byte array The container Header thus put together can be read by readHeaderFromArray. |
| protected abstract void |