|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage
org.apache.jdo.impl.fostore.FOStoreBtreeStorage
FOStore specific BtreeStorage subclass. This class manages MOFIDs for a FOStore datastore. A MOFID consists of two parts: a storageId of type String and a serial number of type long. When storing on disk the storageId is converted into a number and stored as 16-bit value. Only 48 bits of the serial number get represented on disk. FOStore uses the serial number to encode the uid part of an OID and the storageId for the class id of an OID. The btree class MOFIDInfo converts a MOFID into a byte array of 8 bytes that is stored on disk. The two high order bytes represent the storageId. Class MOFIDInfo calls method storageIdToNumber to convert a String storageId into a number. The remaining 6 bytes represent the serial number.
Nested Class Summary | |
(package private) static class |
FOStoreBtreeStorage.Resolver
Dummy implementation. |
Nested classes inherited from class org.netbeans.mdr.persistence.Storage |
org.netbeans.mdr.persistence.Storage.EntryType |
Field Summary | |
private static java.lang.String |
CLID_PREFIX
Prefix for the storageId generated from an class id. |
private static int |
CLID_PREFIX_LENGTH
Length of class id prefix. |
(package private) static org.apache.commons.logging.Log |
logger
Logger |
private static org.netbeans.mdr.persistence.ObjectResolver |
resolver
Dummy ObjectResolver instance required by BtreeStorage create and open methods. |
Fields inherited from class org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage |
|
Constructor Summary | |
FOStoreBtreeStorage(java.lang.String name,
boolean isNew)
Creates a new FOStoreBtreeStorage instance. |
Method Summary | |
org.netbeans.mdr.persistence.MOFID |
createMOFID(int clid,
long uid)
Returns Creates a MOFID based on the class id and uid taken from a FOStore OID. |
java.lang.String |
numberToStorageId(int number)
Creates a storage id from an int. |
int |
storageIdToNumber(java.lang.String storageId)
Converts a storageId to an int. |
Methods inherited from class org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeStorage |
close, commitChanges, create, createMultivaluedIndex, createMultivaluedOrderedIndex, createSinglevaluedIndex, delete, dropIndex, exists, getIndex, getMOFIDData, getMofidGenerator, getMofidMap, getMultivaluedIndex, getMultivaluedOrderedIndex, getName, getPrimaryIndex, getSerialNumber, getSinglevaluedIndex, getStorageId, objectStateChanged, objectStateWillChange, open, readMOFID, readMOFIDData, resolveObject, rollBackChanges, shutDown, supportsMultipleStorableIndexes, writeMOFID, writeMOFIDData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final org.netbeans.mdr.persistence.ObjectResolver resolver
private static final java.lang.String CLID_PREFIX
private static final int CLID_PREFIX_LENGTH
static final org.apache.commons.logging.Log logger
Constructor Detail |
public FOStoreBtreeStorage(java.lang.String name, boolean isNew) throws org.netbeans.mdr.persistence.StorageException
isNew
.
name
- the name of the storage.isNew
- true if the database is being createdMethod Detail |
public org.netbeans.mdr.persistence.MOFID createMOFID(int clid, long uid)
clid
- the class iduid
- the unique id
public int storageIdToNumber(java.lang.String storageId) throws org.netbeans.mdr.persistence.StorageException
storageId
- the storageId as String
org.netbeans.mdr.persistence.StorageException
public java.lang.String numberToStorageId(int number) throws org.netbeans.mdr.persistence.StorageException
number
- the numberic representation of the storageId
org.netbeans.mdr.persistence.StorageException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |