iopc::LruCacheItem Class Reference
[iopclib-cache]

#include <lruCacheItem.h>

Inheritance diagram for iopc::LruCacheItem:

Inheritance graph
[legend]

List of all members.

Public Types

enum  State {
  ST_BORN, ST_ADULT, ST_DOOMED, ST_ZOMBIE,
  ST_BUSY
}

Public Member Functions

virtual DatabaseObjectgetObject ()
virtual CacheLockaddLock (bool rdonly)
 Adds lock to the object.
virtual void rmLock ()
virtual void replaceObject (DatabaseObject *obj)
void remove ()
void addNext (LruCacheItem &item)
void addPrev (LruCacheItem &item)
void release ()

Public Attributes

LruCacheBasecache
PersIdentification persId
DatabaseObjectobjectPtr
State state
LruCacheItemnext
LruCacheItemprev
TimeStamp timeStamp


Detailed Description

Represents an object stored in cache using LRU strategy. Usually the item is part of a double linked list.

Member Enumeration Documentation

Enumeration of item states.

Enumerator:
ST_BORN  An object without persistent copy.
ST_ADULT  An object with persistent copy.
ST_DOOMED  Object scheduled for deletion.
ST_ZOMBIE  Remnant of an item.
ST_BUSY  Item being processed.


Member Function Documentation

DatabaseObject & iopc::LruCacheItem::getObject (  )  [virtual]

Returns the object.

Implements iopc::CacheLock.

CacheLock & iopc::LruCacheItem::addLock ( bool  rdonly  )  [virtual]

Adds lock to the object.

Parameters:
rdonly Specifies type of lock to be added.
Returns:
An instance representing new lock.

Implements iopc::CacheLock.

void iopc::LruCacheItem::rmLock (  )  [virtual]

Removes one lock.

Implements iopc::CacheLock.

void iopc::LruCacheItem::replaceObject ( DatabaseObject obj  )  [virtual]

Replaces the object represented by the item.

void iopc::LruCacheItem::remove (  ) 

Removes item from list.

void iopc::LruCacheItem::addNext ( LruCacheItem item  ) 

Appends an item.

void iopc::LruCacheItem::addPrev ( LruCacheItem item  ) 

Prepends an item.

void iopc::LruCacheItem::release (  ) 

Releases the object being represented by the item.


Member Data Documentation

Owner of the item.

ID of the object.

The object being represented by the item.

State of the item.

Next item,

Previous item.

Time of the last access to the item.


The documentation for this class was generated from the following files:

Generated on Tue Apr 14 16:46:46 2009 for IOPC 2 by  doxygen 1.5.6