ATLAS Offline Software
Loading...
Searching...
No Matches
ISession.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INCLUDE_PERSISTENCYSVC_ISESSION_H
6#define INCLUDE_PERSISTENCYSVC_ISESSION_H
7
10
12
13#include <string>
14#include <memory>
15
16class Placement;
17class Token;
18
19namespace pool {
20
21 // forward declarations
23 class IFileCatalog;
24
26 class ISession;
27 std::unique_ptr<ISession> createSession( IFileCatalog& catalog, int ageLimit = -1 );
28
36
37 class ISession : public ITransaction {
38 public:
41 virtual bool disconnectAll() = 0;
42
44 virtual ITransaction& transaction() = 0;
45 virtual const ITransaction& transaction() const = 0;
46
48 virtual std::unique_ptr<IDatabase> databaseHandle( const std::string& dbName,
49 DatabaseSpecification::NameType dbNameType ) = 0;
50
62 virtual void* readObject( const Token& token, void* object = 0 ) = 0;
63
73 virtual Token* registerForWrite( const Placement& place, const void* object, const RootType& type ) = 0;
74
76 virtual IFileCatalog& fileCatalog() = 0;
77
79 virtual const ITechnologySpecificAttributes& technologySpecificAttributes( long technology ) const = 0;
81
83 virtual ~ISession() = default;
84 };
85}
86#endif
TTypeAdapter RootType
Definition RootType.h:211
This class holds all the necessary information to guide the writing of an object in a physical place.
Definition Placement.h:20
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:22
ISession is the interface class for user (macroscopic) sessions Every transaction and connection to a...
Definition ISession.h:37
virtual void * readObject(const Token &token, void *object=0)=0
Retrieves an object from persistent store and return with type information The handle to the reflecti...
virtual Token * registerForWrite(const Placement &place, const void *object, const RootType &type)=0
registerForWrite registers an object for writing to the persistent medium higher level interactions w...
virtual std::unique_ptr< IDatabase > databaseHandle(const std::string &dbName, DatabaseSpecification::NameType dbNameType)=0
Returns a pointer to a database object. The user acquires ownership of that object.
virtual ITransaction & transaction()=0
Returns the transaction interface.
virtual const ITechnologySpecificAttributes & technologySpecificAttributes(long technology) const =0
Returns the object holding the technology specific attributes for a given technology domain.
virtual const ITransaction & transaction() const =0
virtual IFileCatalog & fileCatalog()=0
Returns the file catalog in use.
virtual ~ISession()=default
virtual destructor for the interface
virtual ITechnologySpecificAttributes & technologySpecificAttributes(long technology)=0
virtual bool disconnectAll()=0
Explicitly disconnects all the databases.
ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes.
ITransaction is the interface class for user (macroscopic transactions) Every operation with the pool...
virtual Io::IoFlag type() const =0
Returns the transaction type.
Framework include files.
Definition libname.h:15
std::unique_ptr< ISession > createSession(IFileCatalog &catalog, int ageLimit=-1)
NameType
Enumeration type specifying the database name field, wherever the latter is used in methods accessing...
Definition IDatabase.h:24