Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

com::sleepycat::bind::serial::StoredClassCatalog Class Reference

Inheritance diagram for com::sleepycat::bind::serial::StoredClassCatalog:

com::sleepycat::bind::serial::ClassCatalog

Public Member Functions

 StoredClassCatalog (Database database) throws DatabaseException, IllegalArgumentException
synchronized void close () throws DatabaseException
synchronized byte[] getClassID (ObjectStreamClass classFormat) throws DatabaseException, ClassNotFoundException
synchronized ObjectStreamClass getClassFormat (byte[] classID) throws DatabaseException, ClassNotFoundException

Detailed Description

A ClassCatalog that is stored in a Database.

A single StoredClassCatalog object is normally used along with a set of databases that stored serialized objects.

Author:
Mark Hayes

Definition at line 44 of file StoredClassCatalog.java.


Constructor & Destructor Documentation

com::sleepycat::bind::serial::StoredClassCatalog::StoredClassCatalog Database  database  )  throws DatabaseException, IllegalArgumentException [inline]
 

Creates a catalog based on a given database. To save resources, only a single catalog object should be used for each unique catalog database.

Parameters:
database an open database to use as the class catalog. It must be a BTREE database and must not allow duplicates.
Exceptions:
DatabaseException if an error occurs accessing the database.
IllegalArgumentException if the database is not a BTREE database or if it configured to allow duplicates.

Definition at line 78 of file StoredClassCatalog.java.


Member Function Documentation

synchronized void com::sleepycat::bind::serial::StoredClassCatalog::close  )  throws DatabaseException [inline]
 

Close a catalog database and release any cached resources.

Implements com::sleepycat::bind::serial::ClassCatalog.

Definition at line 127 of file StoredClassCatalog.java.

Referenced by collections::ship::tuple::SampleDatabase::close(), collections::ship::sentity::SampleDatabase::close(), collections::ship::marshal::SampleDatabase::close(), collections::ship::index::SampleDatabase::close(), collections::ship::factory::SampleDatabase::close(), collections::ship::entity::SampleDatabase::close(), and collections::ship::basic::SampleDatabase::close().

synchronized ObjectStreamClass com::sleepycat::bind::serial::StoredClassCatalog::getClassFormat byte[]  classID  )  throws DatabaseException, ClassNotFoundException [inline]
 

Return the ObjectStreamClass for the given class ID. This may or may not be the current class format, depending on whether the class has changed since the class ID was generated.

Parameters:
classID The class ID for which to return the class format.
Returns:
The class format for the given class ID, which may or may not represent the current version of the class.

Implements com::sleepycat::bind::serial::ClassCatalog.

Definition at line 147 of file StoredClassCatalog.java.

synchronized byte [] com::sleepycat::bind::serial::StoredClassCatalog::getClassID ObjectStreamClass  classFormat  )  throws DatabaseException, ClassNotFoundException [inline]
 

Return the class ID for the current version of the given class description. This is used for storing in serialization streams in place of a full class descriptor, since it is much more compact. To get back the ObjectStreamClass for a class ID, call getClassFormat(byte[]). This function causes a new class ID to be assigned if the class description has changed.

Parameters:
classDesc The class description for which to return the class ID.
Returns:
The class ID for the current version of the class.

Implements com::sleepycat::bind::serial::ClassCatalog.

Definition at line 139 of file StoredClassCatalog.java.

Referenced by com::sleepycat::collections::test::serial::StoredClassCatalogTest::doWork().


The documentation for this class was generated from the following file:
Generated on Sun Dec 25 12:14:59 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2