ATLAS Offline Software
Public Member Functions | Protected Member Functions | List of all members
pool::IDbContainer Class Referenceabstract

#include <StorageSvc/IDbContainer.h>

Inheritance diagram for pool::IDbContainer:
Collaboration diagram for pool::IDbContainer:

Public Member Functions

virtual void release ()=0
 Release the technology specific implementation. More...
 
virtual uint64_t size ()=0
 Access to container size. More...
 
virtual std::string name () const =0
 Get container name. More...
 
virtual DbStatus isShapeSupported (const DbTypeInfo *typ) const =0
 Ask if a given shape is supported. More...
 
virtual DbStatus setOption (const DbOption &refOpt)=0
 Set options. More...
 
virtual DbStatus getOption (DbOption &refOpt)=0
 Access options. More...
 
virtual void * allocate (unsigned long siz, DbContainer &cntH, ShapeH shape)=0
 In place allocation of raw memory. More...
 
virtual DbStatus allocate (DbContainer &cntH, const void *object, ShapeH shape, Token::OID_t &oid)=0
 In place allocation of object location. More...
 
virtual DbStatus free (void *ptr, DbContainer &cntH)=0
 In place deletion of raw memory. More...
 
virtual uint64_t nextRecordId ()=0
 Number of next record in the container (=size if no delete is allowed) More...
 
virtual void useNextRecordId (uint64_t)=0
 Suggest next Record ID for tbe next object written - used only with synced indexes. More...
 
virtual DbStatus close ()=0
 Close the container. More...
 
virtual DbStatus open (DbDatabase &dbH, const std::string &nam, const DbTypeInfo *info, DbAccessMode mode)=0
 Open the container. More...
 
virtual DbStatus update (DbSelect &sel)=0
 Perform UPDATE select. More...
 
virtual DbStatus destroy (DbSelect &sel)=0
 Perform DELETE select. More...
 
virtual DbStatus select (DbSelect &criteria)=0
 Define selection criteria. More...
 
virtual DbStatus fetch (DbSelect &sel)=0
 Fetch next object address of the selection to set token. More...
 
virtual DbStatus load (void **ptr, ShapeH shape, const Token::OID_t &lnkH, Token::OID_t &oid, bool any_next=false)=0
 Find object within the container and load it into memory. More...
 
virtual DbStatus save (DbContainer &cntH, const void *object, ShapeH shape, Token::OID_t &linkH)=0
 Save new object in the container and return its handle. More...
 
virtual DbStatus save (DbObjectHandle< DbObject > &objH)=0
 Add object to the container. More...
 
virtual DbStatus update (DbContainer &cntH, const void *object, ShapeH shape, const DbObjectHandle< DbObject > &objH)=0
 Update existing object in the container. More...
 
virtual DbStatus update (DbContainer &cntH, const void *object, ShapeH shape, const Token::OID_t &linkH)=0
 Update existing object in the container. More...
 
virtual DbStatus destroy (const Token::OID_t &linkH)=0
 Destroy an object in a container. More...
 
virtual DbStatus transAct (Transaction::Action)=0
 Execute Transaction Action. More...
 
virtual bool updatesPending () const =0
 Query the pending transaction stack. More...
 

Protected Member Functions

virtual ~IDbContainer ()
 Destructor (called only by sub-classes) More...
 

Detailed Description

Description:

Interface to the implementation specific part of a container object objects.

Author
M.Frank
Version
1.0

Definition at line 47 of file IDbContainer.h.

Constructor & Destructor Documentation

◆ ~IDbContainer()

virtual pool::IDbContainer::~IDbContainer ( )
inlineprotectedvirtual

Destructor (called only by sub-classes)

Definition at line 50 of file IDbContainer.h.

50 { }

Member Function Documentation

◆ allocate() [1/2]

virtual DbStatus pool::IDbContainer::allocate ( DbContainer cntH,
const void *  object,
ShapeH  shape,
Token::OID_t oid 
)
pure virtual

In place allocation of object location.

Implemented in pool::DbContainerImp.

◆ allocate() [2/2]

virtual void* pool::IDbContainer::allocate ( unsigned long  siz,
DbContainer cntH,
ShapeH  shape 
)
pure virtual

In place allocation of raw memory.

Implemented in pool::DbContainerImp.

◆ close()

virtual DbStatus pool::IDbContainer::close ( )
pure virtual

◆ destroy() [1/2]

virtual DbStatus pool::IDbContainer::destroy ( const Token::OID_t linkH)
pure virtual

Destroy an object in a container.

Parameters
linkH[IN] Object identifier
Returns
Status code indicating success or failure.

Implemented in pool::DbContainerImp.

◆ destroy() [2/2]

virtual DbStatus pool::IDbContainer::destroy ( DbSelect sel)
pure virtual

Perform DELETE select.

Implemented in pool::DbContainerImp.

◆ fetch()

virtual DbStatus pool::IDbContainer::fetch ( DbSelect sel)
pure virtual

Fetch next object address of the selection to set token.

Implemented in pool::RNTupleContainer, pool::RootTreeContainer, pool::DbContainerImp, and pool::RootKeyContainer.

◆ free()

virtual DbStatus pool::IDbContainer::free ( void *  ptr,
DbContainer cntH 
)
pure virtual

In place deletion of raw memory.

Implemented in pool::DbContainerImp.

◆ getOption()

virtual DbStatus pool::IDbContainer::getOption ( DbOption refOpt)
pure virtual

◆ isShapeSupported()

virtual DbStatus pool::IDbContainer::isShapeSupported ( const DbTypeInfo typ) const
pure virtual

Ask if a given shape is supported.

Implemented in pool::RNTupleContainer, pool::RootTreeContainer, and pool::RootKeyContainer.

◆ load()

virtual DbStatus pool::IDbContainer::load ( void **  ptr,
ShapeH  shape,
const Token::OID_t lnkH,
Token::OID_t oid,
bool  any_next = false 
)
pure virtual

Find object within the container and load it into memory.

Parameters
ptr[IN/OUT] ROOT-style address of the pointer to object
shape[IN] Object type
linkH[IN] Preferred object OID
oid[OUT] Actual object OID
any_next[IN] On selection, objects may be skipped. If objects are skipped, the actual oid will differ from the preferred oid.
Returns
Status code indicating success or failure.

Implemented in pool::DbContainerImp, and pool::RootKeyContainer.

◆ name()

virtual std::string pool::IDbContainer::name ( ) const
pure virtual

Get container name.

Implemented in pool::DbContainerImp.

◆ nextRecordId()

virtual uint64_t pool::IDbContainer::nextRecordId ( )
pure virtual

Number of next record in the container (=size if no delete is allowed)

Implemented in pool::RNTupleContainer, pool::RootTreeIndexContainer, pool::DbContainerImp, and pool::RootKeyContainer.

◆ open()

virtual DbStatus pool::IDbContainer::open ( DbDatabase dbH,
const std::string &  nam,
const DbTypeInfo info,
DbAccessMode  mode 
)
pure virtual

◆ release()

virtual void pool::IDbContainer::release ( )
pure virtual

Release the technology specific implementation.

Implemented in pool::DbContainerImp.

◆ save() [1/2]

virtual DbStatus pool::IDbContainer::save ( DbContainer cntH,
const void *  object,
ShapeH  shape,
Token::OID_t linkH 
)
pure virtual

Save new object in the container and return its handle.

Parameters
cntH[IN] Handle to container object.
object[IN] Pointer to feed data.
linkH[OUT] Internal OID to identify object.
Returns
DbStatus code indicating success or failure.

Implemented in pool::DbContainerImp.

◆ save() [2/2]

virtual DbStatus pool::IDbContainer::save ( DbObjectHandle< DbObject > &  objH)
pure virtual

Add object to the container.

Implemented in pool::DbContainerImp.

◆ select()

virtual DbStatus pool::IDbContainer::select ( DbSelect criteria)
pure virtual

Define selection criteria.

Implemented in pool::RNTupleContainer, pool::RootTreeContainer, and pool::RootKeyContainer.

◆ setOption()

virtual DbStatus pool::IDbContainer::setOption ( const DbOption refOpt)
pure virtual

◆ size()

virtual uint64_t pool::IDbContainer::size ( )
pure virtual

◆ transAct()

virtual DbStatus pool::IDbContainer::transAct ( Transaction::Action  )
pure virtual

◆ update() [1/3]

virtual DbStatus pool::IDbContainer::update ( DbContainer cntH,
const void *  object,
ShapeH  shape,
const DbObjectHandle< DbObject > &  objH 
)
pure virtual

Update existing object in the container.

Parameters
cntH[IN] Valid handle to container
object[IN] Pointer to feed data.
objH[IN] Object handle
Returns
Status code indicating success or failure.

Implemented in pool::DbContainerImp.

◆ update() [2/3]

virtual DbStatus pool::IDbContainer::update ( DbContainer cntH,
const void *  object,
ShapeH  shape,
const Token::OID_t linkH 
)
pure virtual

Update existing object in the container.

Parameters
cntH[IN] Valid handle to container
object[IN] Pointer to feed data.
linkH[IN/OUT] Object identifier
Returns
Status code indicating success or failure.

Implemented in pool::DbContainerImp.

◆ update() [3/3]

virtual DbStatus pool::IDbContainer::update ( DbSelect sel)
pure virtual

Perform UPDATE select.

Implemented in pool::DbContainerImp.

◆ updatesPending()

virtual bool pool::IDbContainer::updatesPending ( ) const
pure virtual

Query the pending transaction stack.

Implemented in pool::DbContainerImp.

◆ useNextRecordId()

virtual void pool::IDbContainer::useNextRecordId ( uint64_t  )
pure virtual

Suggest next Record ID for tbe next object written - used only with synced indexes.

Implemented in pool::RootTreeIndexContainer, pool::DbContainerImp, and pool::RNTupleContainer.


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