Commit Graph

7 Commits

Author SHA1 Message Date
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Vlad Zolotarov
e850a723e4 class_registrator::create(): Enforce refference arguments
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-06-09 15:33:38 +03:00
Vlad Zolotarov
f1aa0df4c3 class_registrator: ensure the static member initialization order
There was a possibility for initialization disorder of static member _classes
and its usage in another static class.

Defining the _classes inside the static method that is called when it's accessed ensures
the proper initialization (aka "standard trick", quoting Avi ;)).

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-06-09 15:33:38 +03:00
Paweł Dziepak
bfe6446a89 class_registrator: make no_such_class message more informative
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-06-08 15:24:14 +03:00
Paweł Dziepak
43d915f881 class_registrator: check whether the class exists
Without the check added in this patch if the class doesn't exist
a std::bad_function_call is thrown which is not very informative.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-06-02 14:11:34 +02:00
Gleb Natapov
d0a1e35a86 class factory
In Java it is possible to create an object by knowing its class name in
runtime. Replication strategies are created this way (I presume class
name comes from configuration somehow), so when I translated the code to
urchin I wrote replication_strategy_registry class to map a class name to
a factory function. Now I see that this is used in other places too (I
see that snitch class created in the same way), so instead of repeating
the same code for each class hierarchy that is created from its name in
origin this patch tries to introduce an infrastructure to do that easily.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
2015-04-15 22:37:28 +03:00