|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.prevayler.StorageSystem
abstract class StorageSystem
The base class for the prevalent system that provides the storage engine for storing the various prevalent object maintained by the system.
© Copyright 2008 Sans Pareil Technologies, Inc.
| Nested Class Summary | |
|---|---|
protected static class |
StorageSystem.TaskQueue
The task queue used to ensure that recursive loops when persisting inter-related object graphs do not result in infinite loops. |
| Field Summary | |
|---|---|
private Map<String,PrimaryStorage> |
classMap
A map used to manage the various prevalent objects that may be managed by this prevalent system. |
private Map<String,IndexStorage> |
indexMap
A map used to maintain indices for the various prevalent object types that are managed by this prevalent system. |
protected static Logger |
logger
The logger to use to log messages/errors. |
private Map<String,ReferenceStorage> |
referenceMap
A map used to maintain the references in a prevalent object to other prevalent objects. |
private Map<String,RelationStorage> |
relationMap
A map used to maintain the reverse relationships from prevalent objects to their parents. |
private long |
sequence
The sequence used to generate object ids. |
private static long |
serialVersionUID
|
private static StorageSystem.TaskQueue |
taskQueue
A task queue used when persisting object graphs to avoid infinite loops due to the recursive nature of following object graphs. |
| Constructor Summary | |
|---|---|
StorageSystem()
|
|
| Method Summary | |
|---|---|
protected Object |
generateOid(PrevalentObject object)
Generate the oid to assign to the specified prevalent object. |
protected IndexStorage |
getIndexStorage(Class cls)
Return the map in which the indices for the prevalent class are stored with the indexed field name. |
protected IndexStorage |
getIndexStorage(String name)
Return the map in which the indices for the prevalent class are stored with the indexed field name. |
protected PrimaryStorage |
getPrimaryStorage(Class cls)
Return the map used to maintain instances of the specified type of prevalent objects by its object id. |
protected PrimaryStorage |
getPrimaryStorage(String name)
Return the map used to maintain instances of the specified type of prevalent objects by its object id. |
protected ReferenceStorage |
getReferenceStorage(Class cls)
Return the map used to manage the references to other prevalent objects for the specified prevalent class. |
protected ReferenceStorage |
getReferenceStorage(String name)
Return the map used to manage the references to other prevalent objects for the specified prevalent class. |
protected RelationStorage |
getRelationStorage(Class cls)
Return the map used to manage the relations to other prevalent objects for the specified prevalent class. |
protected RelationStorage |
getRelationStorage(String name)
Return the map used to manage the relations to other prevalent objects for the specified prevalent class. |
protected Collection<PrevalentObject> |
getTaskQueue()
Return the task queue used when persisting objects by reachability. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sptci.prevayler.DatabaseSystem |
|---|
delete, save |
| Methods inherited from interface com.sptci.prevayler.AbstractDatabase |
|---|
count, fetch, fetch, fetch, fetchIntersection, fetchUnion, search |
| Field Detail |
|---|
private static final long serialVersionUID
protected static final transient Logger logger
private final Map<String,PrimaryStorage> classMap
key
for the map are the various classes that are stored in the prevalent
system while the values are the PrimaryStorage instances that
store the prevalent objects of each type.
private final Map<String,IndexStorage> indexMap
key for
the map are the various classes that are stored in the prevalent
system while the values are the IndexStorage instances that
store the indices for the indexed fields in the prevalent objects of
each type.
private final Map<String,ReferenceStorage> referenceMap
key for
the map are the various classes that are stored in the prevalent
system while the values are the ReferenceStorage instances that
store the references for the prevalent objects referenced by the
prevalent object being managed.
private final Map<String,RelationStorage> relationMap
private static transient StorageSystem.TaskQueue taskQueue
private long sequence
| Constructor Detail |
|---|
StorageSystem()
| Method Detail |
|---|
protected Object generateOid(PrevalentObject object)
sequence value if the
prevalent object does not already have an object id.
object - The prevalent object for which an oid is to be generated.
protected PrimaryStorage getPrimaryStorage(Class cls)
cls - The class whose primary storage is to be retrieved.
getPrimaryStorage( String )protected PrimaryStorage getPrimaryStorage(String name)
name - The fully qualified name of the class whose primary storage
is to be retrieved.
protected IndexStorage getIndexStorage(Class cls)
cls - The class whose index storage is to be retrieved.
getIndexStorage( String )protected IndexStorage getIndexStorage(String name)
name - The fully qualified name of the class whose index storage
is to be retrieved.
protected ReferenceStorage getReferenceStorage(Class cls)
cls - The class whose reference storage is to be retrieved.
getReferenceStorage( String )protected ReferenceStorage getReferenceStorage(String name)
name - The fully qualified name of the class whose reference storage
is to be retrieved.
protected RelationStorage getRelationStorage(Class cls)
cls - The class whose relations storage is to be retrieved.
getRelationStorage( String )protected RelationStorage getRelationStorage(String name)
name - The fully qualified name of the class whose relation storage
is to be retrieved.
protected Collection<PrevalentObject> getTaskQueue()
|
SPT Object Database API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||