storage.primitiveStorage
Class PrimitiveStorageManager.FlexibleChunk

java.lang.Object
  extended bystorage.primitiveStorage.PrimitiveStorageManager.Chunk
      extended bystorage.primitiveStorage.PrimitiveStorageManager.FlexibleChunk
Enclosing class:
PrimitiveStorageManager

public final class PrimitiveStorageManager.FlexibleChunk
extends PrimitiveStorageManager.Chunk

Flexible chunks are used to storage information in files which size can grow or decrease. This kind of chunks are used for storage information in files with a high control of the operating system, in database terms this represent the storage in cooked partitions.


Method Summary
 void changeSize(long size)
          Changes the size of the file used by the chunk.
 java.lang.String getInfo()
          Returns a string contains the chunk information.
 long getSize()
          Returns the real size (in bytes) of the chunk, i.e. the size of file used by the chunk.
 
Methods inherited from class storage.primitiveStorage.PrimitiveStorageManager.Chunk
getFile, getFileName, getMaxSize, readPage, writePage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSize

public long getSize()
             throws java.io.IOException
Returns the real size (in bytes) of the chunk, i.e. the size of file used by the chunk.

Throws:
java.io.IOException

changeSize

public void changeSize(long size)
                throws java.io.IOException
Changes the size of the file used by the chunk.

Parameters:
size - The new size of the chunk, this size will be round according to page size.
Throws:
java.io.IOException

getInfo

public java.lang.String getInfo()
                         throws java.io.IOException
Description copied from class: PrimitiveStorageManager.Chunk
Returns a string contains the chunk information.

Specified by:
getInfo in class PrimitiveStorageManager.Chunk
Throws:
java.io.IOException