Class RegionUtils

Direct Known Subclasses:
GemfireUtils

public abstract class RegionUtils extends CacheUtils
The RegionUtils class is an abstract utility class for working with Regions.
Since:
2.0.0
Author:
John Blum
See Also:
  • Constructor Details

    • RegionUtils

      public RegionUtils()
  • Method Details

    • assertClientRegionShortcutAndPersistentAttributeAreCompatible

      public static void assertClientRegionShortcutAndPersistentAttributeAreCompatible(ClientRegionShortcut clientRegionShortcut, Boolean persistent)
      Assert that the configuration settings for ClientRegionShortcut and the persistent attribute in <gfe:*-region> elements are compatible.
      Parameters:
      clientRegionShortcut - ClientRegionShortcut resolved from the SDG XML namespace.
      persistent - boolean indicating the value of the persistent configuration attribute.
      See Also:
    • assertDataPolicyAndPersistentAttributeAreCompatible

      public static void assertDataPolicyAndPersistentAttributeAreCompatible(DataPolicy dataPolicy, Boolean persistent)
      Assert that the configuration settings for DataPolicy and the persistent attribute in <gfe:*-region> elements are compatible.
      Parameters:
      dataPolicy - DataPolicy resolved from the SDG XML namespace.
      persistent - boolean indicating the value of the persistent configuration attribute.
      See Also:
    • close

      public static boolean close(Region<?,?> region)
      Safely closes the target Region.
      Parameters:
      region - Region to close
      Returns:
      a boolean indicating whether the Region was successfully closed or not.
      See Also:
    • isClient

      public static boolean isClient(@Nullable Region<?,?> region)
      Determines whether the target Region is a client Region.
      Parameters:
      region - Region to evaluate.
      Returns:
      a boolean indicating whether the target Region is a client Region.
      See Also:
    • isCloseable

      public static boolean isCloseable(Region<?,?> region)
      Determines whether the given Region is closeable.
      Parameters:
      region - Region to evaluate.
      Returns:
      a boolean value indicating whether the Region is closeable or not.
      See Also:
    • isLocal

      public static boolean isLocal(@Nullable Region<?,?> region)
      Determines whether the given Region is a non-distributed, local Region.
      Parameters:
      region - Region to evaluate.
      Returns:
      a boolean value indicating whether the given Region is a non-distributed, local Region.
      See Also:
    • toRegionName

      @Nullable public static String toRegionName(@Nullable Region<?,?> region)
    • toRegionName

      @Nullable public static String toRegionName(String regionPath)
    • toRegionPath

      @Nullable public static String toRegionPath(@Nullable Region<?,?> region)
    • toRegionPath

      @NonNull public static String toRegionPath(String regionName)
    • isServer

      public static boolean isServer(@Nullable Region<?,?> region)
      Determines whether the target Region is a server-side Region.
      Parameters:
      region - Region to evaluate.
      Returns:
      a boolean indicating whether the target Region is a server-side Region.
      See Also: