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

com::sleepycat::bind::serial::ClassCatalog Interface Reference

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

com::sleepycat::bind::serial::StoredClassCatalog com::sleepycat::bind::serial::test::NullClassCatalog com::sleepycat::bind::serial::test::TestClassCatalog

Public Member Functions

void close () throws DatabaseException
byte[] getClassID (ObjectStreamClass classDesc) throws DatabaseException, ClassNotFoundException
ObjectStreamClass getClassFormat (byte[] classID) throws DatabaseException, ClassNotFoundException

Detailed Description

A catalog of class description information for use during object serialization.

A catalog is used to store class descriptions separately from serialized objects, to avoid redundantly stored information with each object. When serialized objects are stored in a database, a StoredClassCatalog should be used.

This information is used for serialization of class descriptors or java.io.ObjectStreamClass objects, each of which represents a unique class format. For each unique format, a unique class ID is assigned by the catalog. The class ID can then be used in the serialization stream in place of the full class information. When used with SerialInput and SerialOutput or any of the serial bindings, the use of the catalog is transparent to the application.

Author:
Mark Hayes

Definition at line 35 of file ClassCatalog.java.


Member Function Documentation

void com::sleepycat::bind::serial::ClassCatalog::close  )  throws DatabaseException
 

Close a catalog database and release any cached resources.

Implemented in com::sleepycat::bind::serial::StoredClassCatalog, com::sleepycat::bind::serial::test::NullClassCatalog, and com::sleepycat::bind::serial::test::TestClassCatalog.

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

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.

Implemented in com::sleepycat::bind::serial::StoredClassCatalog, com::sleepycat::bind::serial::test::NullClassCatalog, and com::sleepycat::bind::serial::test::TestClassCatalog.

byte [] com::sleepycat::bind::serial::ClassCatalog::getClassID ObjectStreamClass  classDesc  )  throws DatabaseException, ClassNotFoundException
 

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.

Implemented in com::sleepycat::bind::serial::StoredClassCatalog, com::sleepycat::bind::serial::test::NullClassCatalog, and com::sleepycat::bind::serial::test::TestClassCatalog.


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