|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> store >> raw >> [ data overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.impl.store.raw.data
Class InputStreamContainer

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
- All Implemented Interfaces:
- org.apache.derby.iapi.services.cache.Cacheable, org.apache.derby.iapi.services.locks.Lockable, org.apache.derby.iapi.services.io.TypedFormat
- public class InputStreamContainer
- extends FileContainer
A class that uses a ZipEntry to be a single container file, but read-only.
| Field Summary | |
private org.apache.derby.io.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(org.apache.derby.iapi.store.raw.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(org.apache.derby.iapi.store.raw.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(org.apache.derby.iapi.store.raw.log.LogInstant instant,
boolean leaveStub)
Remove the container. |
protected void |
truncatePages(long lastValidPagenum)
|
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, compressContainer, 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 |
containerPath
private org.apache.derby.io.StorageFile containerPath
| Constructor Detail |
InputStreamContainer
public InputStreamContainer(BaseDataFileFactory factory)
| Method Detail |
openContainer
protected final boolean openContainer(org.apache.derby.iapi.store.raw.ContainerKey newIdentity) throws org.apache.derby.iapi.error.StandardException
- Description copied from class:
FileContainer - Open a container.
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.- Specified by:
openContainerin classFileContainer
closeContainer
protected void closeContainer()
- Specified by:
closeContainerin classFileContainer
clean
public final void clean(boolean forRemove)
throws org.apache.derby.iapi.error.StandardException
- Write out the header information for this container. If an i/o exception
occurs then ...
preAllocate
protected final int preAllocate(long lastPreallocPagenum,
int preAllocSize)
- Preallocate page.
- Specified by:
preAllocatein classFileContainer
truncatePages
protected void truncatePages(long lastValidPagenum)
- Specified by:
truncatePagesin classBaseContainer
createContainer
protected void createContainer(org.apache.derby.iapi.store.raw.ContainerKey newIdentity) throws org.apache.derby.iapi.error.StandardException
- 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.
- Specified by:
createContainerin classFileContainer
removeContainer
protected final void removeContainer(org.apache.derby.iapi.store.raw.log.LogInstant instant, boolean leaveStub) throws org.apache.derby.iapi.error.StandardException
- Remove the container.
- Specified by:
removeContainerin classBaseContainer
readPage
protected final void readPage(long pageNumber,
byte[] pageData)
throws java.io.IOException,
org.apache.derby.iapi.error.StandardException
- Read a page into the supplied array.
MT - thread safe- Specified by:
readPagein classFileContainer
readPositionedPage
protected void readPositionedPage(long pageOffset,
byte[] pageData)
throws java.io.IOException
- Read the page at the positioned offset.
This default implementation, opens the stream and skips to the offset
and then reads the data into pageData.
writePage
protected final void writePage(long pageNumber,
byte[] pageData,
boolean syncPage)
throws java.io.IOException,
org.apache.derby.iapi.error.StandardException
- Write a page from the supplied array.
MT - thread safe- Specified by:
writePagein classFileContainer
flushAll
protected final void flushAll()
- Description copied from class:
BaseContainer - Flush all outstanding changes in this container to persistent storage.
- Specified by:
flushAllin classBaseContainer
getInputStream
protected java.io.InputStream getInputStream() throws java.io.IOException
- Get an input stream positioned at the beginning of the file
|
|||||||||
| Home >> All >> org >> apache >> derby >> impl >> store >> raw >> [ data overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC