|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectDatabase
An ObjectDatabase is similar to a Database but instead of working with Field values it works on the constructed Objects. This is only used Internally by the client for a number of pieces of functionality that benefit from pre-created objects such as reference tracking for GC purposes and caching.
Method Summary | |
---|---|
void |
acquireLock(ClientThreadId threadId,
ID jemmId)
Asynchronous request to acquire a lock. |
ClassInfo |
getClassInfo(ClassId classId)
Returns the class information for the given class id. |
EnumInfo |
getEnumInfo(EnumId enumId)
Returns the classname for the given enum type id. |
JEMMObject |
getObject(ID jemmId)
Retrieves an object's information from the database or a local cache if the object has already been retrieved and still in memory. |
JEMMObject |
getRefreshedObject(ID jemmId)
Retrieves an object's information from the database but always calls the underlying database, updating the cache. |
JEMMObject |
getRoot(java.lang.String rootName)
Returns the object stored in the persistent root called 'rootName' |
ID |
newObject(ClassId classId,
JEMMObject obj)
Notification of a new user object creation by the client. |
void |
refreshObject(JEMMObject obj)
Retrieves the fields of the object again from the store and updates the passed object with all the values. |
ClassId |
registerClass(ClassInfo classInfo)
Register a user class. |
EnumId |
registerEnum(EnumInfo enumInfo)
Register an enumerated type. |
void |
releaseLock(ClientThreadId threadId,
ID jemmId)
Release the given lock held by the thread. |
void |
removeLockAcquiredListener(ClientId clientId)
Remove a lock listener |
void |
setClientLockAcquiredListener(ClientId clientId,
LockAcquiredListener listener)
Register a lock listener |
void |
setRoot(java.lang.String rootName,
JEMMObject newValue)
Set the persistent root reference to the given object. |
JEMMObject |
setRootIfNull(java.lang.String rootName,
JEMMObject newValue)
Sets the persistent root reference to the given object, if the root is currently null. |
void |
synchroniseObject(JEMMObject syncObject)
Synchronise a client held object with the server. |
Methods inherited from interface org.sourceforge.jemm.client.TypeRequestHandler |
---|
processTypeRequest |
Method Detail |
---|
JEMMObject getObject(ID jemmId)
getObject
in interface ObjectSource
jemmId
- The id of the object to retrieve.
JEMMObject getRefreshedObject(ID jemmId)
jemmId
- The id of the object to retrieve.
void refreshObject(JEMMObject obj)
obj
- The object to retrieve and updatevoid synchroniseObject(JEMMObject syncObject)
syncObject
- The object being synchronized.void setRoot(java.lang.String rootName, JEMMObject newValue)
rootName
- The name of the persistent root.newValue
- The new value of the root.JEMMObject setRootIfNull(java.lang.String rootName, JEMMObject newValue)
rootName
- The name of the persistent root.newValue
- The new value of the root.
JEMMObject getRoot(java.lang.String rootName)
rootName
- The name of the persistent root.
ClassId registerClass(ClassInfo classInfo) throws StructureModifiedException
classInfo
- The information about the loaded user class (name/fields).
StructureModifiedException
- if the class has been modified
and the Database does not accept the changeEnumId registerEnum(EnumInfo enumInfo) throws StructureModifiedException
enumInfo
- The enumeration type information
StructureModifiedException
- If a modification to the enum is detected.void acquireLock(ClientThreadId threadId, ID jemmId)
threadId
- The requesting thread.jemmId
- The id of the object to lock.void setClientLockAcquiredListener(ClientId clientId, LockAcquiredListener listener)
clientId
- The client who is interested in their lock event notifications.listener
- The listener to register.void removeLockAcquiredListener(ClientId clientId)
clientId
- The id the the client who is no longer interested in lock events.void releaseLock(ClientThreadId threadId, ID jemmId)
threadId
- The thread currently holding the lock.jemmId
- The id of the object to release.ID newObject(ClassId classId, JEMMObject obj)
classId
- The class id of the new object (must be previously registered).
ClassInfo getClassInfo(ClassId classId)
classId
- The id of the held class.
EnumInfo getEnumInfo(EnumId enumId)
enumId
- The enum type id.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |