The saga::replica class implements the saga::attributes interface. More...
#include <logical_file.hpp>
Public Member Functions | |
logical_file (session const &s, saga::url url, int mode=Read) | |
Creates the object. | |
logical_file (saga::url url, int mode=Read) | |
Creates the object. | |
logical_file (saga::object const &o) | |
Creates the object. | |
logical_file (void) | |
Creates the object. | |
~logical_file (void) | |
Destroys the object. | |
logical_file & | operator= (saga::object const &o) |
Brief description starts here. | |
void | add_location (saga::url url) |
Add a replica location to the replica set. | |
void | remove_location (saga::url url) |
Remove a replica location from the replica set. | |
void | update_location (saga::url old_url, saga::url new_url) |
Change a replica location in the replica set. | |
std::vector< saga::url > | list_locations (void) |
List the locations in the location set. | |
void | replicate (saga::url url, int flags=saga::replica::None) |
Brief Replicate a file from any of the known replica locations to a new location, and, on success, add the new replica location to the set of associated replicas. | |
Static Public Member Functions | |
static logical_file | create (session const &s, saga::url url, int mode=Read) |
Factory function resembling logical_file(session, url, int) constructor. | |
static logical_file | create (saga::url url, int mode=Read) |
Factory function resembling logical_file(url, int) constructor. | |
template<typename Tag > | |
static saga::task | create (saga::url url, int mode=Read) |
The saga::replica class implements the saga::attributes interface.
A logical file represents merely an entry in a name space which has (a) an associated set of registered (physical) replicas of that file, and (b) an associated set of meta data describing that logical file. Both sets can be empty. To access the content of a logical file, a saga::file needs to be created with one of the registered replica locations.
Definition at line 102 of file logical_file.hpp.
Creates the object.
Definition at line 68 of file logical_file.cpp.
saga::replica::logical_file::logical_file | ( | saga::url | url, | |
int | mode = Read | |||
) | [explicit] |
Creates the object.
Definition at line 91 of file logical_file.cpp.
saga::replica::logical_file::logical_file | ( | saga::object const & | o | ) | [explicit] |
Creates the object.
Definition at line 114 of file logical_file.cpp.
References saga::BadParameter, saga::object::get_type(), and saga::object::LogicalFile.
saga::replica::logical_file::logical_file | ( | void | ) |
Creates the object.
Definition at line 123 of file logical_file.cpp.
saga::replica::logical_file::~logical_file | ( | void | ) |
Destroys the object.
Definition at line 132 of file logical_file.cpp.
static logical_file saga::replica::logical_file::create | ( | session const & | s, | |
saga::url | url, | |||
int | mode = Read | |||
) | [inline, static] |
Factory function resembling logical_file(session, url, int) constructor.
Definition at line 170 of file logical_file.hpp.
static logical_file saga::replica::logical_file::create | ( | saga::url | url, | |
int | mode = Read | |||
) | [inline, static] |
Factory function resembling logical_file(url, int) constructor.
Definition at line 179 of file logical_file.hpp.
static saga::task saga::replica::logical_file::create | ( | saga::url | url, | |
int | mode = Read | |||
) | [inline, static] |
Definition at line 184 of file logical_file.hpp.
logical_file & saga::replica::logical_file::operator= | ( | saga::object const & | o | ) |
Brief description starts here.
Definition at line 136 of file logical_file.cpp.
void saga::replica::logical_file::add_location | ( | saga::url | url | ) | [inline] |
Add a replica location to the replica set.
url | Location to add to set |
Definition at line 201 of file logical_file.hpp.
References saga::task::get_result().
void saga::replica::logical_file::remove_location | ( | saga::url | url | ) | [inline] |
Remove a replica location from the replica set.
url | Replica to remove from set |
Definition at line 214 of file logical_file.hpp.
References saga::task::get_result().
Change a replica location in the replica set.
old_url | Replica to be updated | |
new_url | Update for the replica |
Definition at line 228 of file logical_file.hpp.
References saga::task::get_result().
std::vector<saga::url> saga::replica::logical_file::list_locations | ( | void | ) | [inline] |
List the locations in the location set.
Definition at line 241 of file logical_file.hpp.
References saga::task::get_result().
void saga::replica::logical_file::replicate | ( | saga::url | url, | |
int | flags = saga::replica::None | |||
) | [inline] |
Brief Replicate a file from any of the known replica locations to a new location, and, on success, add the new replica location to the set of associated replicas.
url | Location to replicate to |
Definition at line 256 of file logical_file.hpp.
References saga::task::get_result().