ATLAS Offline Software
Loading...
Searching...
No Matches
DbStorageSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Header: /cvs/PF/pool/StorageSvc/src/DbStorageSvc.h,v 1.36 2008/03/04 18:34:59 frankb Exp $
6#ifndef POOL_DBSTORAGESVC_H
7#define POOL_DBSTORAGESVC_H
8
9// Framework include files
11#include "StorageSvc/DbDomain.h"
13#include "POOLCore/DbPrint.h"
14
15/*
16 * POOL namespace declaration
17 */
18namespace pool {
19
20 // Forward declarations
22 class DbOption;
23
39 class DbStorageSvc : virtual public IStorageSvc, virtual public APRMessaging
40 {
41 typedef std::vector<const Token*> TokenVec;
42 private:
44 std::string m_name;
46 unsigned int m_refCount;
57 public:
58
61
63 explicit DbStorageSvc(const std::string& name);
64
66 virtual ~DbStorageSvc();
67
68 DbStorageSvc (const DbStorageSvc&) = delete;
70
72 static const char* catalogLabel() { return "pool_DbStorageSvc"; }
73
77 DbDomain& domainHdl() { return m_domH; }
78
80 virtual DbStatus queryInterface(const Guid& riid, void** ppvUnknown);
81
83 virtual unsigned int addRef();
84
86 virtual unsigned int release();
87
89
92
94 virtual DbStatus finalize();
95
97 virtual const std::string& name() const { return m_name; }
98
100
102
114 const std::string& refCont,
115 int technology,
116 const void* object,
117 ShapeH shapeH,
118 Token*& refpTok);
119
121
129 virtual DbStatus read( const FileDescriptor& refDB,
130 const Token& persToken,
131 ShapeH shapeH,
132 void** object);
133
135
140 virtual std::string getContName(FileDescriptor& refDB,
141 Token& persToken);
142
144
157 const Guid& objType,
158 ShapeH& shapeH);
159
161
172 virtual DbStatus createShape( const FileDescriptor& refDB,
173 const std::string& cntName,
174 const Guid& shapeID,
175 ShapeH& shapeH);
176
178
195 virtual DbStatus startSession(int mode,
196 int tech,
197 SessionH& session);
198
200
212 virtual DbStatus endSession( const SessionH session);
213
215
226 virtual DbStatus existsConnection(const SessionH sessionH,
227 int mode,
228 const FileDescriptor& refDB);
229
231
246 virtual DbStatus connect( const SessionH sessionH,
247 int mode,
248 FileDescriptor& refDB);
249
251
265
267
274 int& mode );
275
276
278
295
297
308 virtual DbStatus getDomainOption(const SessionH sessionH,
309 DbOption& opt);
310
312
323 virtual DbStatus setDomainOption(const SessionH sessionH,
324 const DbOption& opt);
325 };
326} // End namespace pool
327#endif // POOL_DBSTORAGESVC_H
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
APRMessaging(const std::string &name)
Description:
Definition DbDomain.h:47
Description: Definition an option to be supplied to database objects.
Definition DbOption.h:36
Db objects: class DbSession.
Definition DbSession.h:43
This class is highly inspired by the error code distribution system as it is used in DEC/VMS or MS/WN...
Definition DbStatus.h:64
The DbStorageExplorer class is able to handle user request for accessing database information such as...
virtual DbStatus queryInterface(const Guid &riid, void **ppvUnknown)
IInterface implementation: Query interfaces of Interface.
virtual DbStatus getDomainOption(const SessionH sessionH, DbOption &opt)
Access options for a given database domain.
virtual DbStatus existsConnection(const SessionH sessionH, int mode, const FileDescriptor &refDB)
Check the existence of a logical Database unit.
DbSession & sessionHdl()
Database session handle.
virtual DbStatus openMode(FileDescriptor &refDB, int &mode)
Query the access mode of a Database unit.
virtual DbStatus endSession(const SessionH session)
End the Database session.
DbStorageExplorer * m_explorer
Reference to storage explorer object.
virtual DbStatus startSession(int mode, int tech, SessionH &session)
Start a new Database Session.
virtual DbStatus getShape(FileDescriptor &refDB, const Guid &objType, ShapeH &shapeH)
Retrieve persistent shape from Storage manager.
int m_ageLimit
Property: AgeLimit indicating the maximal allowed age of files.
virtual DbStatus setDomainOption(const SessionH sessionH, const DbOption &opt)
Set options for a given database domain.
virtual DbStatus disconnect(FileDescriptor &refDB)
Disconnect from a logical Database unit.
virtual unsigned int release()
IInterface implementation: Release Interface instance.
DbDomain m_domH
Database domain handle.
DbSession m_sesH
Database session handle.
DbStorageSvc & operator=(const DbStorageSvc &)=delete
DbStorageSvc()
Standard Constructor: Constructs an object of type DbStorageSvc.
virtual DbStatus allocate(FileDescriptor &refDB, const std::string &refCont, int technology, const void *object, ShapeH shapeH, Token *&refpTok)
Register object for write.
std::string m_name
Service Name.
virtual DbStatus endTransaction(ConnectionH conn, Transaction::Action typ)
End/Finish an existing Transaction sequence.
DbType m_type
Technology type.
DbDomain & domainHdl()
Database domain handle.
virtual DbStatus finalize()
IService implementation override: Finalize Service.
virtual DbStatus initialize()
IService implementation override: Initilize Service.
virtual ~DbStorageSvc()
Standard destructor.
DbStorageSvc(const DbStorageSvc &)=delete
virtual unsigned int addRef()
IInterface implementation: Reference Interface instance.
DbStorageSvc(const std::string &name)
Initializing Constructor: Constructs an object of type DbStorageSvc.
virtual DbStatus createShape(const FileDescriptor &refDB, const std::string &cntName, const Guid &shapeID, ShapeH &shapeH)
Create a persistent shape a given Database container location.
unsigned int m_refCount
Reference counter.
virtual DbStatus connect(const SessionH sessionH, int mode, FileDescriptor &refDB)
Connect to a logical Database unit.
std::vector< const Token * > TokenVec
virtual std::string getContName(FileDescriptor &refDB, Token &persToken)
Get container name for object.
virtual DbStatus read(const FileDescriptor &refDB, const Token &persToken, ShapeH shapeH, void **object)
Read a persistent object from the medium.
static const char * catalogLabel()
Label of the specific class.
virtual const std::string & name() const
IService implementation: Retrieve name of the service.
The IStorageSvc interface is able to handle user request for.
Definition IStorageSvc.h:56
pool namespace
Definition libname.h:15
class Session * SessionH
class DatabaseConnection * ConnectionH
const class Shape * ShapeH