Documentation of 'org.neodatis.odb.impl.core.transaction.Cache' Java class
Cache
org.neodatis.odb.impl.core.transaction

Class Cache

  • All Implemented Interfaces:
    ICache
    Direct Known Subclasses:
    LazyCache, ServerCache


    public class Cache
    extends java.lang.Object
    implements ICache
    A cache of object.
       Cache objects by object, by position, by oids,...
     
    • Constructor Detail

      • Cache

        public Cache(ISession session,
                     java.lang.String name)
    • Method Detail

      • addObjectInfo

        public void addObjectInfo(ObjectInfoHeader objectInfoHeader)
        Only adds the Object info - used for non committed objects
        Specified by:
        addObjectInfo in interface ICache
      • endInsertingObject

        public void endInsertingObject(java.lang.Object object)
        Specified by:
        endInsertingObject in interface ICache
      • removeObject

        public void removeObject(java.lang.Object object)
        Specified by:
        removeObject in interface ICache
      • existObject

        public boolean existObject(java.lang.Object object)
        Specified by:
        existObject in interface ICache
      • getOid

        public OID getOid(java.lang.Object object,
                          boolean throwExceptionIfNotFound)
        Specified by:
        getOid in interface ICache
      • savePositionOfObjectWithOid

        public void savePositionOfObjectWithOid(OID oid,
                                                long objectPosition)
        Description copied from interface: ICache
        To resolve uncommitted updates where the oid change and is not committed yet
        Specified by:
        savePositionOfObjectWithOid in interface ICache
      • isDeleted

        public boolean isDeleted(OID oid)
        Specified by:
        isDeleted in interface ICache
      • getObjectPositionByOid

        public long getObjectPositionByOid(OID oid)
        Returns the position or -1 if it is not is the cache or StorageEngineConstant.NULL_OBJECT_ID_ID if it has been marked as deleted
        Specified by:
        getObjectPositionByOid in interface ICache
      • clearOnCommit

        public void clearOnCommit()
        Specified by:
        clearOnCommit in interface ICache
      • clear

        public void clear(boolean setToNull)
        Specified by:
        clear in interface ICache
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface ICache
        Overrides:
        toString in class java.lang.Object
      • toCompleteString

        public java.lang.String toCompleteString()
        Specified by:
        toCompleteString in interface ICache
      • insertingLevelOf

        public int insertingLevelOf(java.lang.Object object)
        Specified by:
        insertingLevelOf in interface ICache
      • startReadingObjectInfoWithOid

        public void startReadingObjectInfoWithOid(OID oid,
                                                  NonNativeObjectInfo objectInfo)
        Description copied from interface: ICache
        To resolve cyclic reference, keep track of objects being read The read count is used to store how many times the object has been recursively read
        Specified by:
        startReadingObjectInfoWithOid in interface ICache
        Parameters:
        oid - The Object OID
        objectInfo - The object info (not fully set) that is being read
      • getOids

        public java.util.Map<OID,java.lang.Object> getOids()
        Specified by:
        getOids in interface ICache
      • setOids

        public void setOids(java.util.Map<OID,java.lang.Object> oids)
      • setObjectInfoPointersCacheFromOid

        public void setObjectInfoPointersCacheFromOid(java.util.Map<OID,ObjectInfoHeader> objectInfoPointersCacheFromOid)
      • getObjects

        public java.util.Map<java.lang.Object,OID> getObjects()
        Specified by:
        getObjects in interface ICache
      • setObjects

        public void setObjects(java.util.Map<java.lang.Object,OID> objects)
      • usage

        public static java.lang.String usage()

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.