DbStorage.driver
Class SsdDescriptorDriver

java.lang.Object
  extended byDbStorage.driver.SsdDescriptorDriver
Direct Known Subclasses:
LobContentUnitDriver, LobPrimitiveSsdDescriptorDriver, NonPrimitiveSsdDescriptorDriver, SimplePrimitiveSsdDescriptorDriver

public class SsdDescriptorDriver
extends java.lang.Object

This class drives a semistructured datum descriptor, this is stored in the ID segment.


Field Summary
static int DICTIONARY_REFERENCES_OFFSET
           
static int FIRST_PARENT_OFFSET
           
static int HEAD_PARENTS_COLLECTION_OFFSET
           
static int ROOT_PARENTS_COLLECTION_OFFSET
           
static int TYPE_OFFSET
           
 
Constructor Summary
SsdDescriptorDriver()
           
 
Method Summary
static void createSsdDescriptor(DbStorageManager dbsm, long transactionNumber, DbUnitAddress newUnitAddress)
          Creates a SSD descriptor.
static long getDictionaryReferences(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress)
          Returns the number of times that the dictionary references the descripted datum.
static void getFirstParent(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, PhysicalID destiny)
          Gets the physical id of the first parent.
static void getHeadParentsCollection(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the unit addres in the parent's segment where the parents' collection is.
static void getRootParentsCollection(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the unit addres in the parent's segment where the parents' collection is.
static int getType(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress)
          Returns the type of the descripted datum.
static void setDictionaryReferences(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, long source)
          Sets the number of times that the dictionary references the descripted datum.
static void setFirstParent(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, PhysicalID source)
          Sets the physical id of the first parent.
static void setHeadParentsCollection(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the unit addres in the parentīs segment where the parents' collection is.
static void setRootParentsCollection(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the unit addres in the parentīs segment where the parents' collection is.
static void setType(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, int source)
          Sets the type of the descripted datum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DICTIONARY_REFERENCES_OFFSET

public static final int DICTIONARY_REFERENCES_OFFSET
See Also:
Constant Field Values

FIRST_PARENT_OFFSET

public static final int FIRST_PARENT_OFFSET
See Also:
Constant Field Values

ROOT_PARENTS_COLLECTION_OFFSET

public static final int ROOT_PARENTS_COLLECTION_OFFSET
See Also:
Constant Field Values

HEAD_PARENTS_COLLECTION_OFFSET

public static final int HEAD_PARENTS_COLLECTION_OFFSET
See Also:
Constant Field Values

TYPE_OFFSET

public static final int TYPE_OFFSET
See Also:
Constant Field Values
Constructor Detail

SsdDescriptorDriver

public SsdDescriptorDriver()
Method Detail

createSsdDescriptor

public static void createSsdDescriptor(DbStorageManager dbsm,
                                       long transactionNumber,
                                       DbUnitAddress newUnitAddress)
                                throws storage.StorageException,
                                       java.io.IOException
Creates a SSD descriptor.

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

getDictionaryReferences

public static long getDictionaryReferences(DbStorageManager dbsm,
                                           long transactionNumber,
                                           DbUnitAddress unitAddress)
                                    throws storage.StorageException,
                                           java.io.IOException
Returns the number of times that the dictionary references the descripted datum.

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.
Returns:
The number of datum's references in the dictionary.
Throws:
storage.StorageException
java.io.IOException

setDictionaryReferences

public static void setDictionaryReferences(DbStorageManager dbsm,
                                           long transactionNumber,
                                           DbUnitAddress unitAddress,
                                           long source)
                                    throws storage.StorageException,
                                           java.io.IOException
Sets the number of times that the dictionary references the descripted datum.

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.
source - The number of datum's references in the dictionary.
Throws:
storage.StorageException
java.io.IOException

getFirstParent

public static void getFirstParent(DbStorageManager dbsm,
                                  long transactionNumber,
                                  DbUnitAddress unitAddress,
                                  PhysicalID destiny)
                           throws storage.StorageException,
                                  java.io.IOException
Gets the physical id of the first parent.

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.
destiny - Where the retrieved Id will be stored.
Throws:
storage.StorageException
java.io.IOException

setFirstParent

public static void setFirstParent(DbStorageManager dbsm,
                                  long transactionNumber,
                                  DbUnitAddress unitAddress,
                                  PhysicalID source)
                           throws storage.StorageException,
                                  java.io.IOException
Sets the physical id of the first parent.

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.
source - Where the Id is stored.
Throws:
storage.StorageException
java.io.IOException

getRootParentsCollection

public static void getRootParentsCollection(DbStorageManager dbsm,
                                            long transactionNumber,
                                            DbUnitAddress unitAddress,
                                            DbUnitAddress destiny)
                                     throws storage.StorageException,
                                            java.io.IOException
Gets the unit addres in the parent's segment where the parents' collection is.

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.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setRootParentsCollection

public static void setRootParentsCollection(DbStorageManager dbsm,
                                            long transactionNumber,
                                            DbUnitAddress unitAddress,
                                            DbUnitAddress source)
                                     throws storage.StorageException,
                                            java.io.IOException
Sets the unit addres in the parentīs segment where the parents' collection is.

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.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getHeadParentsCollection

public static void getHeadParentsCollection(DbStorageManager dbsm,
                                            long transactionNumber,
                                            DbUnitAddress unitAddress,
                                            DbUnitAddress destiny)
                                     throws storage.StorageException,
                                            java.io.IOException
Gets the unit addres in the parent's segment where the parents' collection is.

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.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setHeadParentsCollection

public static void setHeadParentsCollection(DbStorageManager dbsm,
                                            long transactionNumber,
                                            DbUnitAddress unitAddress,
                                            DbUnitAddress source)
                                     throws storage.StorageException,
                                            java.io.IOException
Sets the unit addres in the parentīs segment where the parents' collection is.

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.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getType

public static int getType(DbStorageManager dbsm,
                          long transactionNumber,
                          DbUnitAddress unitAddress)
                   throws storage.StorageException,
                          java.io.IOException
Returns the type of the descripted datum.

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.
Returns:
The type.
Throws:
storage.StorageException
java.io.IOException

setType

public static void setType(DbStorageManager dbsm,
                           long transactionNumber,
                           DbUnitAddress unitAddress,
                           int source)
                    throws storage.StorageException,
                           java.io.IOException
Sets the type of the descripted datum.

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.
source - The type.
Throws:
storage.StorageException
java.io.IOException