- java.lang.Object
-
- com.erudika.para.core.utils.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,Object>getRegistry(String registryName)Retrieve an entire registry.static ObjectgetValue(String registryName, String key)Retrieve one specific value from a registry.static voidputValue(String registryName, String key, Object value)Add a specific value to a registry.static voidremoveValue(String registryName, String key)Remove a specific value from a registry.
-
-
-
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).
-
-