|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDbStorage.manager.DictionaryManager
This class manages the content of the dictionary. The dictionary collection is implemented using 4 data structures combined in one, 2 AA-trees and 2 double linked list are used, for ordering the collection by identificator and ssd-table name.
Constructor Summary | |
DictionaryManager()
|
Method Summary | |
static boolean |
contains(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
DictionaryEntry entry)
Checks if a specified dictionary entry belongs to the collection. |
static boolean |
contains(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
java.lang.String entryName,
PhysicalID entryID)
Checks if a specified dictionary entry belongs to the collection. |
static boolean |
containsID(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
PhysicalID matchID)
Checks if a specified identifier is in some dictionary entry in the collection. |
static boolean |
containsName(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
java.lang.String matchName)
Checks if a specified nameed is in some dictionary entry in the collection. |
static void |
delete(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
DictionaryEntry entry)
Deletes a specified dictionary entry from the collection. |
static void |
delete(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
java.lang.String entryName,
PhysicalID entryID)
Deletes a specified dictionary entry from the collection. |
static void |
deleteID(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
PhysicalID deletedID)
Deletes a specified dictionary entry from the collection. |
static void |
deleteName(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
java.lang.String deletedName)
Deletes a specified dictionary entry from the collection. |
static void |
formatHeader(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header)
Sets the initial values for the dictionary header. |
static DictionaryEntry |
getDictionaryEntryFromNode(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress nodeAddress)
Returns the dictionary entry of a specified node of the collection. |
static void |
getFirstWithID(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
PhysicalID matchID,
DbUnitAddress destiny)
Finds the first node in the collection with the specified identifier. |
static void |
getID(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
java.lang.String matchName,
PhysicalID id)
Finds the first identifier in the collection with the specified name. |
static java.lang.String |
getNameFromNode(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress nodeAddress)
Returns the name of a specified node of the collection. |
static void |
insert(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
DictionaryEntry entry)
Inserts a specified dictionary entry to the collection. |
static void |
insert(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
java.lang.String entryName,
PhysicalID entryID)
Inserts a specified dictionary entry to the collection. |
static void |
remove(DbStorageManager dbsm,
long transactionNumber,
DbUnitAddress header,
DbUnitAddress node)
Removes a specified node from the dictionary collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DictionaryManager()
Method Detail |
public static void formatHeader(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.
storage.StorageException
java.io.IOException
public static java.lang.String getNameFromNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress nodeAddress) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.nodeAddress
- The addres of the node in the DICTIONARY segment.
String
object.
storage.StorageException
java.io.IOException
public static DictionaryEntry getDictionaryEntryFromNode(DbStorageManager dbsm, long transactionNumber, DbUnitAddress nodeAddress) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.nodeAddress
- The addres of the node in the DICTIONARY segment.
DictionaryEntry onject.
- Throws:
storage.StorageException
java.io.IOException
public static void remove(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, DbUnitAddress node) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.node
- The node to remove.
storage.StorageException
java.io.IOException
public static boolean contains(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, DictionaryEntry entry) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.entry
- The dictionary entry.
true
if the dictionary entry is in the collection,
false
otherwise.
storage.StorageException
java.io.IOException
public static boolean contains(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, java.lang.String entryName, PhysicalID entryID) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.entryName
- The name of the dictionary entry.entryID
- The identifier of the dictionary entry.
true
if the dictionary entry is in the collection,
false
otherwise.
storage.StorageException
java.io.IOException
public static void insert(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, DictionaryEntry entry) throws storage.StorageException, java.io.IOException, UnavailableUnitException, AlreadyExistingException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.entry
- The dictionary entry.
storage.StorageException
java.io.IOException
UnavailableUnitException
AlreadyExistingException
public static void insert(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, java.lang.String entryName, PhysicalID entryID) throws storage.StorageException, java.io.IOException, UnavailableUnitException, AlreadyExistingException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.entryName
- The name of the dictionary entry.entryID
- The identifier of the dictionary entry.
storage.StorageException
java.io.IOException
UnavailableUnitException
AlreadyExistingException
public static void getFirstWithID(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, PhysicalID matchID, DbUnitAddress destiny) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.matchID
- The identifier to find.destiny
- Where the node's address is stored, it will be a null address if the
identifier is not found.
storage.StorageException
java.io.IOException
public static boolean containsID(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, PhysicalID matchID) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.matchID
- The identifier to find.
true
if the identifier is in the collection,
false
otherwise.
storage.StorageException
java.io.IOException
public static void getID(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, java.lang.String matchName, PhysicalID id) throws storage.StorageException, java.io.IOException, NotExistingException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.matchName
- The name to find.id
- Where the identificator is stored.
storage.StorageException
java.io.IOException
NotExistingException
public static boolean containsName(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, java.lang.String matchName) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.matchName
- The labe to find.
true
if the name is in the collection,
false
otherwise.
storage.StorageException
java.io.IOException
public static void delete(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, DictionaryEntry entry) throws storage.StorageException, java.io.IOException, NotExistingException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.entry
- The dictionary entry.
storage.StorageException
java.io.IOException
NotExistingException
public static void delete(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, java.lang.String entryName, PhysicalID entryID) throws storage.StorageException, java.io.IOException, NotExistingException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.entryName
- The name of the dictionary entry.entryID
- The identifier of the dictionary entry.
storage.StorageException
java.io.IOException
NotExistingException
public static void deleteID(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, PhysicalID deletedID) throws storage.StorageException, java.io.IOException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.deletedID
- The identifier of the dictionary entries to delete.
storage.StorageException
java.io.IOException
public static void deleteName(DbStorageManager dbsm, long transactionNumber, DbUnitAddress header, java.lang.String deletedName) throws storage.StorageException, java.io.IOException, NotExistingException
dbsm
- The data base storage manager where the operation will be performed.transactionNumber
- The number of transaction.header
- The address of the dictionary header.deletedName
- The name of the dictionary entry to delete.
storage.StorageException
java.io.IOException
NotExistingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |