DbStorage.driver
Class LobContentUnitDriver

java.lang.Object
  extended byDbStorage.driver.SsdDescriptorDriver
      extended byDbStorage.driver.LobContentUnitDriver

public final class LobContentUnitDriver
extends SsdDescriptorDriver

This class drives the pages of content in the LOB segment.


Field Summary
 
Fields inherited from class DbStorage.driver.SsdDescriptorDriver
DICTIONARY_REFERENCES_OFFSET, FIRST_PARENT_OFFSET, HEAD_PARENTS_COLLECTION_OFFSET, ROOT_PARENTS_COLLECTION_OFFSET, TYPE_OFFSET
 
Constructor Summary
LobContentUnitDriver()
           
 
Method Summary
static void createContentUnit(DbStorageManager dbsm, long transactionNumber, DbUnitAddress newUnitAddress)
          Creates a content unit.
static int getContent(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, int position, int maxLength, byte[] b, int off)
          Gets the part of datum's content stored in the specified page.
static int setContent(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, int position, int maxLength, byte[] b, int off)
          Sets the part of datum's content stored in the specified page.
 
Methods inherited from class DbStorage.driver.SsdDescriptorDriver
createSsdDescriptor, getDictionaryReferences, getFirstParent, getHeadParentsCollection, getRootParentsCollection, getType, setDictionaryReferences, setFirstParent, setHeadParentsCollection, setRootParentsCollection, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LobContentUnitDriver

public LobContentUnitDriver()
Method Detail

createContentUnit

public static void createContentUnit(DbStorageManager dbsm,
                                     long transactionNumber,
                                     DbUnitAddress newUnitAddress)
                              throws storage.StorageException,
                                     java.io.IOException
Creates a content unit.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
newUnitAddress - The address of the created unit in the LOB segment.
Throws:
storage.StorageException
java.io.IOException

getContent

public static int getContent(DbStorageManager dbsm,
                             long transactionNumber,
                             DbUnitAddress unitAddress,
                             int position,
                             int maxLength,
                             byte[] b,
                             int off)
                      throws storage.StorageException,
                             java.io.IOException
Gets the part of datum's content stored in the specified page.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the page.
position - The position in the page from which the reading starts.
maxLength - The maximun number of bytes to be got.
b - Where the content will be stored.
off - The begining position of b where the content will be stored.
Returns:
The number of bytes recovered bytes.
Throws:
storage.StorageException
java.io.IOException

setContent

public static int setContent(DbStorageManager dbsm,
                             long transactionNumber,
                             DbUnitAddress unitAddress,
                             int position,
                             int maxLength,
                             byte[] b,
                             int off)
                      throws storage.StorageException,
                             java.io.IOException
Sets the part of datum's content stored in the specified page.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the SSD descriptor.
position - The position in the page from which the writting starts.
maxLength - The maximun number of bytes to be setted.
b - Where the content is stored.
off - The begining position of b where the content is stored.
Returns:
The number of wroten bytes.
Throws:
storage.StorageException
java.io.IOException