Process::getBufferStatistics Method

getBufferStatistics(obj: Object;
                    jdo: JadeDynamicObject): Boolean;

The Process class getBufferStatistics method returns cache-related information about the object specified by the obj parameter.

The cache information is returned as properties inserted into the JadeDynamicObject instance specified by the jdo parameter.

The calling process is responsible for creating and deleting this instance. Any existing properties in the JadeDynamicObject instance are cleared when the getBufferStatistics method is called.

The method returns true if the object was in cache at the time of the call, and false if the object was not in cache. It does not load an object into cache if it was not already present.

The properties inserted into the JadeDynamicObject instance are listed in the following table.

Property Type Description
object Object A reference to the specified object.
size Integer The size of the object in bytes.
lives Integer The current number of lives for the object; that is, its cache retention priority value.
cycles Integer The number of times the object has been retained instead of removed from cache due to the number of lives being greater than 1.
flag Integer The status of the object cache, which can be one of the following values.
    0 Empty; that is, contains no data.
    1 Active; that is, contains data.
    2 Temporary; that is, an empty exclusive collection.
    3 Updated; that is, contains uncommitted updates.
    4 Created; that is, a newly created object that has not yet been committed.
    5 Permanent; that is, a newly created exclusive collection that has not yet been committed.
    6 Deleted; that is, an object that has been deleted but the deletion has not yet been committed.
    7 Not applicable.
    8 Being read; that is, the object is currently being loaded into cache.
    9 Dirty; that is, contains updates done by another process that have not yet been committed.
    10 Obsolete; that is, contains obsolete data that will not be used. When next accessed, the data is refreshed by reloading the object.
operations Integer64 The number of times the object has been accessed since being loaded into the cache.
age Integer64 The number of node ticks that have elapsed since the object was loaded into cache. (Node ticks record the total number of accesses for all objects in all caches.)

You can use the getBufferStatistics method with persistent and transient objects. With transient objects, a process can examine only shared transient objects and its own non-shared transient objects. For an example of this method, see the getBufferStatistics method in Volume 2 of the JADE Encyclopaedia of Classes.