DbStorage.driver
Class ContentNodeDriver

java.lang.Object
  extended byDbStorage.driver.ContentNodeDriver

public final class ContentNodeDriver
extends java.lang.Object

This class drives a content node for building contents of non-primitive data, this is stored in the CONTENT segment. A content node is used to keep 4 data structures for the non-primitive data content, this structures are: A binary tree ordered by id, a linked list ordered by id, a binary tree ordered by label and a linked list ordered by label; those structures try to provide a high performance for data management.


Field Summary
static int ID_HEIGHT_OFFSET
           
static int ID_OFFSET
           
static int LABEL_CONTENT_EXTENSION_OFFSET
           
static int LABEL_CONTENT_OFFSET
           
static int LABEL_HEIGHT_OFFSET
           
static int LABEL_SIZE_OFFSET
           
static int LEFT_ID_NODE_OFFSET
           
static int LEFT_LABEL_NODE_OFFSET
           
static int NEXT_ID_NODE_OFFSET
           
static int NEXT_LABEL_NODE_OFFSET
           
static int PARENT_ID_NODE_OFFSET
           
static int PARENT_LABEL_NODE_OFFSET
           
static int PREVIOUS_ID_NODE_OFFSET
           
static int PREVIOUS_LABEL_NODE_OFFSET
           
static int RIGHT_ID_NODE_OFFSET
           
static int RIGHT_LABEL_NODE_OFFSET
           
 
Constructor Summary
ContentNodeDriver()
           
 
Method Summary
static void createContentNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress newUnitAddress)
          Creates a content node.
static void getId(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, PhysicalID destiny)
          Gets the physical id in the specified node.
static byte getIdHeight(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress)
          Gets the height of the specified node in the tree order by id.
static int getLabelContent(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, int maxLength, byte[] b, int off)
          Gets the part of label's content stored in the specified node.
static void getLabelContentExtension(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the label content extension's address (in the CONTENT segment) of the label in the specified node.
static byte getLabelHeight(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress)
          Gets the height of the specified node in the tree order by label.
static int getLabelSize(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress)
          Returns the size of the label in the specified node.
static void getLeftIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the left node's address of the specified node, in the order by id.
static void getLeftLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the left node's address of the specified node, in the order by label.
static void getNextIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the next node's address of the specified node, in the order by id.
static void getNextLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the next node's address of the specified node, in the order by label.
static void getParentIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the parent node's address of the specified node, in the tree order by id.
static void getParentLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the parent node's address of the specified node, in the tree order by label.
static void getPreviousIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the previous node's address of the specified node, in the order by id.
static void getPreviousLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the previous node's address of the specified node, in the order by label.
static void getRightIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the right node's address of the specified node, in the order by id.
static void getRightLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress destiny)
          Gets the right node's address of the specified node, in the order by label.
static void setId(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, PhysicalID source)
          Sets the physical id in the specified node.
static void setIdHeight(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, byte source)
          Sets the height of the specified node in the tree order by id.
static int setLabelContent(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, int maxLength, byte[] b, int off)
          Sets the part of label's content stored in the specified node.
static void setLabelContentExtension(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the label content extension's address (in the CONTENT segment) of the label in the specified node.
static void setLabelHeight(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, byte source)
          Sets the height of the specified node in the tree order by label.
static void setLabelSize(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, int source)
          Sets the size of the label in the specified node.
static void setLeftIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the left node's address of the specified node, in the order by id.
static void setLeftLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the left node's address of the specified node, in the order by label.
static void setNextIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the next node's address of the specified node, in the order by id.
static void setNextLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the next node's address of the specified node, in the order by label.
static void setParentIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the previous node's address of the specified node, in the tree order by id.
static void setParentLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the parent node's address of the specified node, in the tree order by label.
static void setPreviousIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the previous node's address of the specified node, in the order by id.
static void setPreviousLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the previous node's address of the specified node, in the order by label.
static void setRightIdNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the right node's address of the specified node, in the order by id.
static void setRightLabelNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress unitAddress, DbUnitAddress source)
          Sets the right node's address of the specified node, in the order by label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREVIOUS_ID_NODE_OFFSET

public static final int PREVIOUS_ID_NODE_OFFSET
See Also:
Constant Field Values

NEXT_ID_NODE_OFFSET

public static final int NEXT_ID_NODE_OFFSET
See Also:
Constant Field Values

LEFT_ID_NODE_OFFSET

public static final int LEFT_ID_NODE_OFFSET
See Also:
Constant Field Values

RIGHT_ID_NODE_OFFSET

public static final int RIGHT_ID_NODE_OFFSET
See Also:
Constant Field Values

PARENT_ID_NODE_OFFSET

public static final int PARENT_ID_NODE_OFFSET
See Also:
Constant Field Values

ID_HEIGHT_OFFSET

public static final int ID_HEIGHT_OFFSET
See Also:
Constant Field Values

PREVIOUS_LABEL_NODE_OFFSET

public static final int PREVIOUS_LABEL_NODE_OFFSET
See Also:
Constant Field Values

NEXT_LABEL_NODE_OFFSET

public static final int NEXT_LABEL_NODE_OFFSET
See Also:
Constant Field Values

LEFT_LABEL_NODE_OFFSET

public static final int LEFT_LABEL_NODE_OFFSET
See Also:
Constant Field Values

RIGHT_LABEL_NODE_OFFSET

public static final int RIGHT_LABEL_NODE_OFFSET
See Also:
Constant Field Values

PARENT_LABEL_NODE_OFFSET

public static final int PARENT_LABEL_NODE_OFFSET
See Also:
Constant Field Values

LABEL_HEIGHT_OFFSET

public static final int LABEL_HEIGHT_OFFSET
See Also:
Constant Field Values

ID_OFFSET

public static final int ID_OFFSET
See Also:
Constant Field Values

LABEL_CONTENT_EXTENSION_OFFSET

public static final int LABEL_CONTENT_EXTENSION_OFFSET
See Also:
Constant Field Values

LABEL_SIZE_OFFSET

public static final int LABEL_SIZE_OFFSET
See Also:
Constant Field Values

LABEL_CONTENT_OFFSET

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

ContentNodeDriver

public ContentNodeDriver()
Method Detail

createContentNode

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

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 CONTENT segment.
Throws:
storage.StorageException
java.io.IOException

getPreviousIdNode

public static void getPreviousIdNode(DbStorageManager dbsm,
                                     long transactionNumber,
                                     DbUnitAddress unitAddress,
                                     DbUnitAddress destiny)
                              throws storage.StorageException,
                                     java.io.IOException
Gets the previous node's address of the specified node, in the order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setPreviousIdNode

public static void setPreviousIdNode(DbStorageManager dbsm,
                                     long transactionNumber,
                                     DbUnitAddress unitAddress,
                                     DbUnitAddress source)
                              throws storage.StorageException,
                                     java.io.IOException
Sets the previous node's address of the specified node, in the order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getNextIdNode

public static void getNextIdNode(DbStorageManager dbsm,
                                 long transactionNumber,
                                 DbUnitAddress unitAddress,
                                 DbUnitAddress destiny)
                          throws storage.StorageException,
                                 java.io.IOException
Gets the next node's address of the specified node, in the order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setNextIdNode

public static void setNextIdNode(DbStorageManager dbsm,
                                 long transactionNumber,
                                 DbUnitAddress unitAddress,
                                 DbUnitAddress source)
                          throws storage.StorageException,
                                 java.io.IOException
Sets the next node's address of the specified node, in the order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getLeftIdNode

public static void getLeftIdNode(DbStorageManager dbsm,
                                 long transactionNumber,
                                 DbUnitAddress unitAddress,
                                 DbUnitAddress destiny)
                          throws storage.StorageException,
                                 java.io.IOException
Gets the left node's address of the specified node, in the order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setLeftIdNode

public static void setLeftIdNode(DbStorageManager dbsm,
                                 long transactionNumber,
                                 DbUnitAddress unitAddress,
                                 DbUnitAddress source)
                          throws storage.StorageException,
                                 java.io.IOException
Sets the left node's address of the specified node, in the order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getRightIdNode

public static void getRightIdNode(DbStorageManager dbsm,
                                  long transactionNumber,
                                  DbUnitAddress unitAddress,
                                  DbUnitAddress destiny)
                           throws storage.StorageException,
                                  java.io.IOException
Gets the right node's address of the specified node, in the order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setRightIdNode

public static void setRightIdNode(DbStorageManager dbsm,
                                  long transactionNumber,
                                  DbUnitAddress unitAddress,
                                  DbUnitAddress source)
                           throws storage.StorageException,
                                  java.io.IOException
Sets the right node's address of the specified node, in the order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getParentIdNode

public static void getParentIdNode(DbStorageManager dbsm,
                                   long transactionNumber,
                                   DbUnitAddress unitAddress,
                                   DbUnitAddress destiny)
                            throws storage.StorageException,
                                   java.io.IOException
Gets the parent node's address of the specified node, in the tree order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setParentIdNode

public static void setParentIdNode(DbStorageManager dbsm,
                                   long transactionNumber,
                                   DbUnitAddress unitAddress,
                                   DbUnitAddress source)
                            throws storage.StorageException,
                                   java.io.IOException
Sets the previous node's address of the specified node, in the tree order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getIdHeight

public static byte getIdHeight(DbStorageManager dbsm,
                               long transactionNumber,
                               DbUnitAddress unitAddress)
                        throws storage.StorageException,
                               java.io.IOException
Gets the height of the specified node in the tree order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
Returns:
The height in the tree id order.
Throws:
storage.StorageException
java.io.IOException

setIdHeight

public static void setIdHeight(DbStorageManager dbsm,
                               long transactionNumber,
                               DbUnitAddress unitAddress,
                               byte source)
                        throws storage.StorageException,
                               java.io.IOException
Sets the height of the specified node in the tree order by id.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - The height in the tree id order.
Throws:
storage.StorageException
java.io.IOException

getPreviousLabelNode

public static void getPreviousLabelNode(DbStorageManager dbsm,
                                        long transactionNumber,
                                        DbUnitAddress unitAddress,
                                        DbUnitAddress destiny)
                                 throws storage.StorageException,
                                        java.io.IOException
Gets the previous node's address of the specified node, in the order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setPreviousLabelNode

public static void setPreviousLabelNode(DbStorageManager dbsm,
                                        long transactionNumber,
                                        DbUnitAddress unitAddress,
                                        DbUnitAddress source)
                                 throws storage.StorageException,
                                        java.io.IOException
Sets the previous node's address of the specified node, in the order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getNextLabelNode

public static void getNextLabelNode(DbStorageManager dbsm,
                                    long transactionNumber,
                                    DbUnitAddress unitAddress,
                                    DbUnitAddress destiny)
                             throws storage.StorageException,
                                    java.io.IOException
Gets the next node's address of the specified node, in the order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setNextLabelNode

public static void setNextLabelNode(DbStorageManager dbsm,
                                    long transactionNumber,
                                    DbUnitAddress unitAddress,
                                    DbUnitAddress source)
                             throws storage.StorageException,
                                    java.io.IOException
Sets the next node's address of the specified node, in the order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getLeftLabelNode

public static void getLeftLabelNode(DbStorageManager dbsm,
                                    long transactionNumber,
                                    DbUnitAddress unitAddress,
                                    DbUnitAddress destiny)
                             throws storage.StorageException,
                                    java.io.IOException
Gets the left node's address of the specified node, in the order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setLeftLabelNode

public static void setLeftLabelNode(DbStorageManager dbsm,
                                    long transactionNumber,
                                    DbUnitAddress unitAddress,
                                    DbUnitAddress source)
                             throws storage.StorageException,
                                    java.io.IOException
Sets the left node's address of the specified node, in the order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getRightLabelNode

public static void getRightLabelNode(DbStorageManager dbsm,
                                     long transactionNumber,
                                     DbUnitAddress unitAddress,
                                     DbUnitAddress destiny)
                              throws storage.StorageException,
                                     java.io.IOException
Gets the right node's address of the specified node, in the order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setRightLabelNode

public static void setRightLabelNode(DbStorageManager dbsm,
                                     long transactionNumber,
                                     DbUnitAddress unitAddress,
                                     DbUnitAddress source)
                              throws storage.StorageException,
                                     java.io.IOException
Sets the right node's address of the specified node, in the order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getParentLabelNode

public static void getParentLabelNode(DbStorageManager dbsm,
                                      long transactionNumber,
                                      DbUnitAddress unitAddress,
                                      DbUnitAddress destiny)
                               throws storage.StorageException,
                                      java.io.IOException
Gets the parent node's address of the specified node, in the tree order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the retrieved unit address will be stored.
Throws:
storage.StorageException
java.io.IOException

setParentLabelNode

public static void setParentLabelNode(DbStorageManager dbsm,
                                      long transactionNumber,
                                      DbUnitAddress unitAddress,
                                      DbUnitAddress source)
                               throws storage.StorageException,
                                      java.io.IOException
Sets the parent node's address of the specified node, in the tree order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the unit address is stored.
Throws:
storage.StorageException
java.io.IOException

getLabelHeight

public static byte getLabelHeight(DbStorageManager dbsm,
                                  long transactionNumber,
                                  DbUnitAddress unitAddress)
                           throws storage.StorageException,
                                  java.io.IOException
Gets the height of the specified node in the tree order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
Returns:
The height in the tree label order.
Throws:
storage.StorageException
java.io.IOException

setLabelHeight

public static void setLabelHeight(DbStorageManager dbsm,
                                  long transactionNumber,
                                  DbUnitAddress unitAddress,
                                  byte source)
                           throws storage.StorageException,
                                  java.io.IOException
Sets the height of the specified node in the tree order by label.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - The height in the tree label order.
Throws:
storage.StorageException
java.io.IOException

getId

public static void getId(DbStorageManager dbsm,
                         long transactionNumber,
                         DbUnitAddress unitAddress,
                         PhysicalID destiny)
                  throws storage.StorageException,
                         java.io.IOException
Gets the physical id in the specified node.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
destiny - Where the id will be stored.
Throws:
storage.StorageException
java.io.IOException

setId

public static void setId(DbStorageManager dbsm,
                         long transactionNumber,
                         DbUnitAddress unitAddress,
                         PhysicalID source)
                  throws storage.StorageException,
                         java.io.IOException
Sets the physical id in the specified node.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - Where the id is stored.
Throws:
storage.StorageException
java.io.IOException

getLabelContentExtension

public static void getLabelContentExtension(DbStorageManager dbsm,
                                            long transactionNumber,
                                            DbUnitAddress unitAddress,
                                            DbUnitAddress destiny)
                                     throws storage.StorageException,
                                            java.io.IOException
Gets the label content extension's address (in the CONTENT segment) of the label in the specified node.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the label content extension.
destiny - Where the address will be stored.
Throws:
storage.StorageException
java.io.IOException

setLabelContentExtension

public static void setLabelContentExtension(DbStorageManager dbsm,
                                            long transactionNumber,
                                            DbUnitAddress unitAddress,
                                            DbUnitAddress source)
                                     throws storage.StorageException,
                                            java.io.IOException
Sets the label content extension's address (in the CONTENT segment) of the label in the specified node.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the label content extension.
source - Where the address will is stored.
Throws:
storage.StorageException
java.io.IOException

getLabelSize

public static int getLabelSize(DbStorageManager dbsm,
                               long transactionNumber,
                               DbUnitAddress unitAddress)
                        throws storage.StorageException,
                               java.io.IOException
Returns the size of the label in the specified node.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
Returns:
The label's size.
Throws:
storage.StorageException
java.io.IOException

setLabelSize

public static void setLabelSize(DbStorageManager dbsm,
                                long transactionNumber,
                                DbUnitAddress unitAddress,
                                int source)
                         throws storage.StorageException,
                                java.io.IOException
Sets the size of the label in the specified node.

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
source - The label's size.
Throws:
storage.StorageException
java.io.IOException

getLabelContent

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

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
maxLength - The maximun number of bytes to be got.
b - Where the content will be stored.
off - The begining position of b where the label's content will be stored.
Throws:
storage.StorageException
java.io.IOException

setLabelContent

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

Parameters:
dbsm - The data base storage manager where the operation will be performed.
transactionNumber - The number of transaction.
unitAddress - The address of the content node.
maxLength - The maximun number of bytes to be got.
b - Where the content is stored.
off - The begining position of b where the label's content is stored.
Throws:
storage.StorageException
java.io.IOException