|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstorage.primitiveStorage.PrimitiveStorageManager.Chunk
A chunks is a part of secundary storage. Operative systems organize the secundary storage using files, so, a chunk simply is a file or a part of a file. The primitive storage component can use several chunks to organize its information. Chunks can help to overcome some storage difficulties like the size file limits provide for some operative systems, also chunks provides the use of several store devices for keeping a commun information. In database systems chunks are used to storage huge databases.
Method Summary | |
java.io.RandomAccessFile |
getFile()
Returns the java RandomAccessFile used by the chunk. |
java.lang.String |
getFileName()
Returns the file name used by the chunk. |
abstract java.lang.String |
getInfo()
Returns a string contains the chunk information. |
long |
getMaxSize()
Returns the maximum size (in bytes) of the chunk. |
void |
readPage(long pageNumber,
byte[] b)
Reads a page from the chunk and copies the content in the specified byte array. |
void |
writePage(long pageNumber,
byte[] b)
Writes a page in the chunk and taking the content from a specified byte array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void readPage(long pageNumber, byte[] b) throws PageNumberOutOfRangeException, java.io.IOException
pageNumber
- The number of the page to be readed.b
- The byte array when the page's content will be copied.
PageNumberOutOfRangeException
java.io.IOException
public void writePage(long pageNumber, byte[] b) throws PageNumberOutOfRangeException, java.io.IOException
pageNumber
- The number of the page to be wrote.b
- The byte array from which the page takes its content.
PageNumberOutOfRangeException
java.io.IOException
public long getMaxSize()
public java.lang.String getFileName()
public java.io.RandomAccessFile getFile()
RandomAccessFile
used by the chunk.
public abstract java.lang.String getInfo() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |