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
See Also:
  • Region
  • RegionAttributes
  • Constructor Details

    • RegionUtils

      public RegionUtils()
  • Method Details

    • assertClientRegionShortcutAndPersistentAttributeAreCompatible

      public static void assertClientRegionShortcutAndPersistentAttributeAreCompatible(org.apache.geode.cache.client.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(org.apache.geode.cache.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:
      • DataPolicy
    • close

      public static boolean close(org.apache.geode.cache.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:
      • Region.close()
    • isClient

      public static boolean isClient(@Nullable org.apache.geode.cache.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:
      • Region
    • isCloseable

      public static boolean isCloseable(org.apache.geode.cache.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:
      • Region
    • isLocal

      public static boolean isLocal(@Nullable org.apache.geode.cache.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:
      • Region
    • toRegionName

      @Nullable public static String toRegionName(@Nullable org.apache.geode.cache.Region<?,?> region)
    • toRegionName

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

      @Nullable public static String toRegionPath(@Nullable org.apache.geode.cache.Region<?,?> region)
    • toRegionPath

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

      public static boolean isServer(@Nullable org.apache.geode.cache.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:
      • Region