org.neodatis.odb.impl.core.transaction
Class Session
java.lang.Object
org.neodatis.odb.impl.core.transaction.Session
- All Implemented Interfaces:
- java.lang.Comparable, java.util.Observer, ISession
- Direct Known Subclasses:
- ClientSession, LocalSession
public abstract class Session
- extends java.lang.Object
- implements java.lang.Comparable, ISession
An ODB Session. Keeps track of all the session operations. Caches objects and
manage the transaction.
The meta model of the database is stored in the session.
- Author:
- osmadja
Constructor Summary |
Session(java.lang.String id,
java.lang.String baseIdentification)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Observer |
update |
cache
protected ICache cache
tmpCache
protected ITmpCache tmpCache
- A temporary cache used for object info read
rollbacked
protected boolean rollbacked
id
public java.lang.String id
baseIdentification
protected java.lang.String baseIdentification
metaModel
protected MetaModel metaModel
Session
public Session(java.lang.String id,
java.lang.String baseIdentification)
buildCache
public abstract ICache buildCache()
buildTmpCache
public abstract ITmpCache buildTmpCache()
getCache
public ICache getCache()
- Specified by:
getCache
in interface ISession
getTmpCache
public ITmpCache getTmpCache()
- Specified by:
getTmpCache
in interface ISession
rollback
public void rollback()
- Specified by:
rollback
in interface ISession
close
public void close()
- Specified by:
close
in interface ISession
clearCache
public void clearCache()
- Specified by:
clearCache
in interface ISession
isRollbacked
public boolean isRollbacked()
- Specified by:
isRollbacked
in interface ISession
clear
public void clear()
- Specified by:
clear
in interface ISession
getId
public java.lang.String getId()
- Specified by:
getId
in interface ISession
setId
public void setId(java.lang.String sessionId)
- Specified by:
setId
in interface ISession
getStorageEngine
public abstract IStorageEngine getStorageEngine()
- Specified by:
getStorageEngine
in interface ISession
transactionIsPending
public abstract boolean transactionIsPending()
- Specified by:
transactionIsPending
in interface ISession
commit
public abstract void commit()
- Specified by:
commit
in interface ISession
getTransaction
public abstract ITransaction getTransaction()
- Specified by:
getTransaction
in interface ISession
setFileSystemInterfaceToApplyTransaction
public abstract void setFileSystemInterfaceToApplyTransaction(IFileSystemInterface fsi)
- Specified by:
setFileSystemInterfaceToApplyTransaction
in interface ISession
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interface java.lang.Comparable
getBaseIdentification
public java.lang.String getBaseIdentification()
- Specified by:
getBaseIdentification
in interface ISession
getMetaModel
public MetaModel getMetaModel()
- Specified by:
getMetaModel
in interface ISession
setMetaModel
public void setMetaModel(MetaModel metaModel2)
- Specified by:
setMetaModel
in interface ISession
setBaseIdentification
public void setBaseIdentification(java.lang.String baseIdentification)
removeObjectFromCache
public void removeObjectFromCache(java.lang.Object object)
- Specified by:
removeObjectFromCache
in interface ISession
addObjectToCache
public void addObjectToCache(OID oid,
java.lang.Object object,
ObjectInfoHeader oih)
- Description copied from interface:
ISession
- Add these information on a session cache.
- Specified by:
addObjectToCache
in interface ISession