ATLAS Offline Software
Loading...
Searching...
No Matches
IDbContainer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5//
6// Package : pool/StorageSvc (The pool framework)
7//
8// @author M.Frank
9//
10//====================================================================
11#ifndef POOL_IDBCONTAINER_H
12#define POOL_IDBCONTAINER_H
13
14// Framework include files
16#include "StorageSvc/pool.h"
18
19#include <vector>
20#include <cstdint>
21
22/*
23 * POOL namespace declaration
24 */
25namespace pool {
26
27 // Forward declarations
28 class DbTypeInfo;
29 class DbDatabase;
30 class DbContainer;
31 class DbOption;
32
33 typedef const class Shape *ShapeH;
34
46 protected:
48 virtual ~IDbContainer() { }
49
50 public:
52 virtual void release() = 0;
54 virtual uint64_t size() = 0;
56 virtual std::string name() const = 0;
58 virtual StatusCode setOption(const DbOption& refOpt) = 0;
60 virtual StatusCode getOption(DbOption& refOpt) = 0;
62 virtual StatusCode store(const void* object,
63 DbContainer& cntH,
64 ShapeH shape) = 0;
66 virtual StatusCode allocate(DbContainer& cntH,
67 const void* object,
68 ShapeH shape,
69 Token::OID_t& oid) = 0;
70
72 virtual uint64_t nextRecordId() = 0;
74 virtual void useNextRecordId(uint64_t) = 0;
75
77 virtual StatusCode close() = 0;
79 virtual StatusCode open( DbDatabase& dbH,
80 const std::string& nam,
81 const DbTypeInfo* info,
82 DbAccessMode mode) = 0;
84 virtual StatusCode checkAccess(DbDatabase& dbH,
85 const std::string& nam) const = 0;
87 virtual StatusCode next(Token::OID_t& linkH) = 0;
88
90
99 virtual StatusCode load( void** ptr, ShapeH shape,
100 const Token::OID_t& lnkH,
101 Token::OID_t& oid,
102 bool any_next=false) = 0;
103
105 virtual StatusCode transAct(Transaction::Action) = 0;
106 };
107} // End namespace pool
108#endif // POOL_IDBCONTAINER_H
This file contains the class definition for the Token class (migrated from POOL).
Description: Definition of the object describing a database container Handle managing a DbContainerOb...
Definition DbContainer.h:49
Description: Handle managing a DbDatabaseObj, a generic Database object.
Definition DbDatabase.h:55
Description: Definition an option to be supplied to database objects.
Definition DbOption.h:37
Definition of class DbTypeInfo.
Definition DbTypeInfo.h:49
virtual StatusCode setOption(const DbOption &refOpt)=0
Set options.
virtual uint64_t nextRecordId()=0
Number of next record in the container (=size if no delete is allowed)
virtual void release()=0
Release the technology specific implementation.
virtual StatusCode open(DbDatabase &dbH, const std::string &nam, const DbTypeInfo *info, DbAccessMode mode)=0
Open the container.
virtual StatusCode checkAccess(DbDatabase &dbH, const std::string &nam) const =0
Check if we can access the container for reading with the given type.
virtual StatusCode 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.
virtual ~IDbContainer()
Destructor (called only by sub-classes)
virtual StatusCode next(Token::OID_t &linkH)=0
Fetch next object address to set token.
virtual StatusCode allocate(DbContainer &cntH, const void *object, ShapeH shape, Token::OID_t &oid)=0
In place allocation of object location.
virtual uint64_t size()=0
Access to container size.
virtual std::string name() const =0
Get container name.
virtual StatusCode store(const void *object, DbContainer &cntH, ShapeH shape)=0
Store object in location.
virtual StatusCode getOption(DbOption &refOpt)=0
Access options.
virtual StatusCode transAct(Transaction::Action)=0
Execute Transaction Action.
virtual StatusCode close()=0
Close the container.
virtual void useNextRecordId(uint64_t)=0
Suggest next Record ID for tbe next object written - used only with synced indexes.
Description:
Definition Shape.h:35
pool namespace
Definition libname.h:15
const class Shape * ShapeH