iopc::ArcCacheItem Class Reference
[iopclib-cache]

#include <arcCacheItem.h>

Inheritance diagram for iopc::ArcCacheItem:

Inheritance graph
[legend]

List of all members.

Public Types

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

Public Member Functions

DatabaseObjectgetObject ()
CacheLockaddLock (bool rdonly)
 Adds lock to the object.
void rmLock ()
void replaceObject (DatabaseObject *obj)
void remove ()
void addNext (ArcCacheItem &item)
void addPrev (ArcCacheItem &item)
void release ()
void setFrequent (bool frequent=true)
bool isFrequent ()

Public Attributes

ArcCacheBasecache
PersIdentification persId
DatabaseObjectobjectPtr
State state
ArcCacheItemnext
ArcCacheItemprev
TimeStamp timeStamp
bool frequent


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  DatabaseObject scheduled for deletion.
ST_ZOMBIE  Remnant of an item.
ST_BUSY  Item being processed.
ST_HIST  History record.


Member Function Documentation

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

Returns the object.

Implements iopc::CacheLock.

CacheLock & iopc::ArcCacheItem::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::ArcCacheItem::rmLock (  )  [virtual]

Removes one lock.

Implements iopc::CacheLock.

void iopc::ArcCacheItem::replaceObject ( DatabaseObject obj  ) 

Replaces the object represented by the item.

void iopc::ArcCacheItem::remove (  ) 

Removes item from list.

void iopc::ArcCacheItem::addNext ( ArcCacheItem item  ) 

Appends an item.

void iopc::ArcCacheItem::addPrev ( ArcCacheItem item  ) 

Prepends an item.

void iopc::ArcCacheItem::release (  ) 

Releases the object being represented by the item.

void iopc::ArcCacheItem::setFrequent ( bool  frequent = true  ) 

Set frequency/recency.

bool iopc::ArcCacheItem::isFrequent (  ) 

Inspect frequency/recency.


Member Data Documentation

Owner of the item.

ID of the object.

The object represented by the item.

State of the item.

Next item.

Previous item.

Time of the last access to the item.

indicates, whether item was accessed more than once (whether is frequent xor recent).


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

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