locality.h 821 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. //
  3. // Copyright (c) 2019-2020 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com)
  4. //
  5. // Distributed under the MIT Software License
  6. //
  7. #include "plugin_base.h"
  8. namespace rotor::plugin {
  9. /** \struct locality_plugin_t
  10. *
  11. * \brief detects and assings locality leader to the supevisor
  12. *
  13. * For the supervisors hierarchy it detecs top-level supervisor which uses
  14. * the same locality and assigns it's queue to each of the supervisors
  15. * in the tree.
  16. *
  17. */
  18. struct locality_plugin_t : public plugin_base_t {
  19. using plugin_base_t::plugin_base_t;
  20. /** The plugin unique identity to allow further static_cast'ing*/
  21. static const void *class_identity;
  22. const void *identity() const noexcept override;
  23. void activate(actor_base_t *actor) noexcept override;
  24. };
  25. } // namespace rotor::plugin