|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.fostore.DBInfo
This class represents the information about the contents of the store itself which must be durable across JVMs.
This class is public
so that it can be used as a
Streamable
and stored in the database.
Nested Class Summary | |
(package private) class |
DBInfo.DBClassIterator
|
(package private) class |
DBInfo.ExtentIterator
|
Field Summary | |
private static int |
DBCLASS_UID
|
private static OID |
dbInfoOID
This is the OID of the DBInfo. |
private java.util.HashSet |
dirtyExtents
Set of extents that are currently modified and need to be stored when a transaction commits. |
private static int |
EXTENT_UID
|
private static int |
FIRST_CLASS_UID
|
private FOStoreDatabase |
fodb
|
(package private) static org.apache.commons.logging.Log |
logger
Logger |
private static org.apache.jdo.util.I18NHelper |
msg
I18N support. |
private CLID |
nextCLID
|
private java.util.ArrayList |
nextUIDs
|
private static int |
SUBCLASS_UID
|
Constructor Summary | |
|
DBInfo()
|
(package private) |
DBInfo(FOStoreDatabase fodb)
Create a new instance. |
Method Summary | |
(package private) void |
clearDirtyExtents()
Causes this DBInfo to forget about the dirty state of all extents marked as dirty since the last time storeDirtyExtents was invoked. |
(package private) static DBInfo |
get(FOStoreDatabase db)
|
(package private) java.util.Iterator |
getDBClasses()
|
(package private) static OID |
getDBClassOID(CLID clid)
Provides the OID which represents the given CLID's class. |
(package private) static OID |
getExtentOID(CLID clid)
Provides the OID which represents extent of instances of objects all of which have the given CLID. |
(package private) java.util.Iterator |
getExtents()
|
(package private) static OID |
getSubclassSetOID(CLID clid)
Provides the OID which at which is stored the ArrayList of the CLIDs of of subclasses of the class corresponding to the CLID. |
(package private) boolean |
makeExtentDirty(DBExtent e)
Marks the given extent as dirty, so that it can later be stored. |
(package private) OID |
newClassOID()
Provide a new OID to represent a class. |
(package private) OID |
newInstanceOID(CLID clid)
Provide a new OID for the given CLID. |
void |
read(java.io.InputStream is)
|
(package private) void |
store()
|
(package private) void |
storeDirtyExtents()
Stores all extents that have been marked dirty since the last time this method was invoked. |
java.lang.String |
toString()
Returns a human-readable description of this DBInfo. |
void |
write(java.io.OutputStream os)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private FOStoreDatabase fodb
private static final OID dbInfoOID
private CLID nextCLID
private static final int DBCLASS_UID
private static final int SUBCLASS_UID
private static final int EXTENT_UID
private static final int FIRST_CLASS_UID
private java.util.ArrayList nextUIDs
private java.util.HashSet dirtyExtents
private static final org.apache.jdo.util.I18NHelper msg
static final org.apache.commons.logging.Log logger
Constructor Detail |
DBInfo(FOStoreDatabase fodb)
fodb
- The FOStoreDatabase instance.
FOStoreFatalInternalException
- Thrown when there is an attempt
to create a second DBInfo within a store.public DBInfo()
Method Detail |
void store() throws FOStoreDatabaseException
FOStoreDatabaseException
static DBInfo get(FOStoreDatabase db) throws FOStoreDatabaseException
FOStoreDatabaseException
OID newClassOID()
static OID getDBClassOID(CLID clid)
clid
- The CLID for which the corresponding OID is needed.
static OID getSubclassSetOID(CLID clid)
clid
- The CLID for which the corresponding OID is needed.
static OID getExtentOID(CLID clid)
clid
- CLID of extent to return.
java.util.Iterator getDBClasses()
boolean makeExtentDirty(DBExtent e)
void storeDirtyExtents() throws FOStoreDatabaseException
FOStoreDatabaseException
void clearDirtyExtents()
java.util.Iterator getExtents()
OID newInstanceOID(CLID clid)
clid
- CLID for which a new OID is needed.
FOStoreFatalInternalException
- thrown if the CLID is invalid.public java.lang.String toString()
public void write(java.io.OutputStream os) throws org.netbeans.mdr.persistence.StorageException
write
in interface org.netbeans.mdr.persistence.Streamable
org.netbeans.mdr.persistence.StorageException
public void read(java.io.InputStream is) throws org.netbeans.mdr.persistence.StorageException
read
in interface org.netbeans.mdr.persistence.Streamable
org.netbeans.mdr.persistence.StorageException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |