mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 00:20:47 +00:00
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>