|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.store.raw.data.BaseContainer
org.apache.derby.impl.store.raw.data.FileContainer
org.apache.derby.impl.store.raw.data.InputStreamContainer
A class that uses a ZipEntry to be a single container file, but read-only.
Field Summary | |
private StorageFile |
containerPath
|
Fields inherited from class org.apache.derby.impl.store.raw.data.FileContainer |
ALLOC_PAGE_ARG_NUM, 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, STORED_PAGE_ARG_NUM |
Fields inherited from class org.apache.derby.impl.store.raw.data.BaseContainer |
identity, isCommittedDrop, isDropped, isReusableRecordId |
Constructor Summary | |
InputStreamContainer(BaseDataFileFactory factory)
|
Method Summary | |
void |
clean(boolean forRemove)
Write out the header information for this container. |
protected void |
closeContainer()
|
protected void |
createContainer(ContainerKey newIdentity)
Create a new container, all references to identity must be through the passed in identity, this object will no identity until after this method returns. |
protected void |
flushAll()
Flush all outstanding changes in this container to persistent storage. |
protected java.io.InputStream |
getInputStream()
Get an input stream positioned at the beginning of the file |
protected boolean |
openContainer(ContainerKey newIdentity)
Open a container. |
protected int |
preAllocate(long lastPreallocPagenum,
int preAllocSize)
Preallocate page. |
protected void |
readPage(long pageNumber,
byte[] pageData)
Read a page into the supplied array. |
protected void |
readPositionedPage(long pageOffset,
byte[] pageData)
Read the page at the positioned offset. |
protected void |
removeContainer(LogInstant instant,
boolean leaveStub)
Remove the container. |
protected void |
writePage(long pageNumber,
byte[] pageData,
boolean syncPage)
Write a page from the supplied array. |
Methods inherited from class org.apache.derby.impl.store.raw.data.BaseContainer |
addPage, fillInIdentity, getAllocPage, getAnyPage, getCommittedDropState, getContainerId, getContainerStatus, getDeallocLock, getDroppedState, getFirstPage, getIdentity, getNextPage, getSegmentId, isReusableRecordId, lockAttributes, lockerAlwaysCompatible, lockEvent, removePage, requestCompatible, setCommittedDropState, setDroppedState, setReusableRecordIdState, truncate, unlockEvent, use |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.derby.iapi.services.cache.Cacheable |
getIdentity |
Field Detail |
private StorageFile containerPath
Constructor Detail |
public InputStreamContainer(BaseDataFileFactory factory)
Method Detail |
protected final boolean openContainer(ContainerKey newIdentity) throws StandardException
FileContainer
Longer descrption of routine.
Open a container. Open the file that maps to this container, if the
file does not exist then we assume the container was never created.
If the file exists but we have trouble opening it then we throw some
exception.
MT - single thread required - Enforced by cache manager.
openContainer
in class FileContainer
StandardException
- Standard exception policy.protected void closeContainer()
closeContainer
in class FileContainer
public final void clean(boolean forRemove) throws StandardException
StandardException
- Standard Cloudscape error policyCacheable.clean(boolean)
protected final int preAllocate(long lastPreallocPagenum, int preAllocSize)
preAllocate
in class FileContainer
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 createContainer(ContainerKey newIdentity) throws StandardException
createContainer
in class FileContainer
StandardException
- Cloudscape Standard error policyprotected final void removeContainer(LogInstant instant, boolean leaveStub) throws StandardException
removeContainer
in class BaseContainer
leaveStub
- if true, leave a stub. If false, remove everything
StandardException
- Standard Cloudscape error policyRawContainerHandle.removeContainer(org.apache.derby.iapi.store.raw.log.LogInstant)
protected final void readPage(long pageNumber, byte[] pageData) throws java.io.IOException, StandardException
readPage
in class FileContainer
StandardException
- standard cloudscape error message
java.io.IOException
- error reading pageprotected void readPositionedPage(long pageOffset, byte[] pageData) throws java.io.IOException
java.io.IOException
protected final void writePage(long pageNumber, byte[] pageData, boolean syncPage) throws java.io.IOException, StandardException
writePage
in class FileContainer
java.io.IOException
- error writing page
StandardException
- Standard Cloudscape error policyprotected final void flushAll()
BaseContainer
flushAll
in class BaseContainer
protected java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |