Class RegistryUtils


  • public final class RegistryUtils
    extends Object
    A utility for creating, reading, and updating registries. The Registry allows for efficient sharing of information between multiple nodes of a Para cluster. Registry objects are saved in the DAO resource for the root application.
    Author:
    Jeremy Wiesner [jswiesner@gmail.com]
    • Method Detail

      • putValue

        public static void putValue​(String registryName,
                                    String key,
                                    Object value)
        Add a specific value to a registry. If the registry doesn't exist yet, create it.
        Parameters:
        registryName - the name of the registry.
        key - the unique key corresponding to the value to insert (typically an appid).
        value - the value to add to the registry.
      • getValue

        public static Object getValue​(String registryName,
                                      String key)
        Retrieve one specific value from a registry.
        Parameters:
        registryName - the name of the registry.
        key - the unique key corresponding to the value to retrieve (typically an appid).
        Returns:
        the value corresponding to the registry key, null if no value is found for the specified key.
      • removeValue

        public static void removeValue​(String registryName,
                                       String key)
        Remove a specific value from a registry.
        Parameters:
        registryName - the name of the registry.
        key - the unique key corresponding to the value to remove (typically an appid).
      • getRegistry

        public static Map<String,​Object> getRegistry​(String registryName)
        Retrieve an entire registry.
        Parameters:
        registryName - the name of the registry.
        Returns:
        the map of all registry values, null if no registry is found by the specified name.