4 #ifndef DMLITE_CPP_POOLDRIVER_H
5 #define DMLITE_CPP_POOLDRIVER_H
27 explicit Chunk(
const std::string& str);
49 explicit Location(
const std::string& str);
134 #endif // DMLITE_CPP_POOLDRIVER_H
bool operator>(const Chunk &) const
virtual std::string getPoolName(void)
Get the pool name of this pool.
Base class for interfaces.
Definition: base.h:18
Common methods and functions for URL and path.
virtual bool poolIsAvailable(bool write=true)
Check if the pool is actually available.
virtual void justCreated(const Pool &pool)
Called just after a pool is added to the database.
Handler for a pool. Works similary to a file handler.
Definition: pooldriver.h:55
Url url
Definition: pooldriver.h:31
Header generated by CMake with the build configuration used.
Represent the complete location of a file.
Definition: pooldriver.h:42
Base exception class.
Definition: exceptions.h:17
Location(int nitems, const Chunk &proto)
Definition: pooldriver.h:44
File replica metadata.
Definition: inode.h:87
std::string toString(void) const
virtual std::string getPoolType(void)
Get the pool type of this pool.
virtual bool replicaIsAvailable(const Replica &replica)
Check if a replica is available.
virtual std::string implementedPool()
Supported pool type.
virtual uint64_t getFreeSpace(void)
Get the free space of this pool.
virtual Location whereToWrite(const std::string &path)
Get where to put a file.
bool operator!=(const Chunk &) const
virtual ~PoolDriverFactory()
Destructor.
Exceptions used by the API.
virtual Location whereToRead(const Replica &replica)
Get the actual location of the file replica. This is pool-specific.
Represents a chunk of a file.
Definition: pooldriver.h:23
Base class for factories.
Definition: base.h:48
bool operator==(const Chunk &) const
PoolDriver factory.
Definition: pooldriver.h:117
uint64_t offset
Definition: pooldriver.h:29
uint64_t size
Definition: pooldriver.h:30
virtual void toBeCreated(const Pool &pool)
virtual ~PoolDriver()
Destructor.
virtual void removeReplica(const Replica &replica)
Remove a replica from the pool.
Internal interface for handling pool metadata.
Definition: poolmanager.h:22
bool operator<(const Chunk &) const
virtual PoolHandler * createPoolHandler(const std::string &poolName)
Create a handler.
Location(const Location &l)
Definition: pooldriver.h:46
virtual void cancelWrite(const Location &loc)
Cancel a write.
virtual void toBeDeleted(const Pool &pool)
virtual ~PoolHandler()
Destructor.
virtual PoolDriver * createPoolDriver(void)
Instantiate the implemented pool driver.
Interface for a pool driver.
Definition: pooldriver.h:92
Location()
Definition: pooldriver.h:43
std::string toString(void) const
virtual void update(const Pool &pool)
Called when updating a pool.
virtual uint64_t getTotalSpace(void)
Get the total space of this pool.