Class RegionUtils
java.lang.Object
org.springframework.data.gemfire.util.SpringExtensions
org.springframework.data.gemfire.util.DistributedSystemUtils
org.springframework.data.gemfire.util.CacheUtils
org.springframework.data.gemfire.util.RegionUtils
- Direct Known Subclasses:
GemfireUtils
The
RegionUtils
class is an abstract utility class for working with Regions
.- Since:
- 2.0.0
- See Also:
-
Region
RegionAttributes
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.data.gemfire.util.SpringExtensions
SpringExtensions.OrderedBeanWrapper<T>, SpringExtensions.ValueReturningThrowableOperation<T>, SpringExtensions.VoidReturningThrowableOperation
-
Field Summary
Fields inherited from class org.springframework.data.gemfire.util.CacheUtils
DEFAULT_POOL_NAME
Fields inherited from class org.springframework.data.gemfire.util.DistributedSystemUtils
DEFAULT_CACHE_SERVER_PORT, DEFAULT_LOCATOR_PORT, DURABLE_CLIENT_ID_PROPERTY_NAME, DURABLE_CLIENT_TIMEOUT_PROPERTY_NAME, GEMFIRE_PREFIX, NAME_PROPERTY_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertClientRegionShortcutAndPersistentAttributeAreCompatible
(org.apache.geode.cache.client.ClientRegionShortcut clientRegionShortcut, Boolean persistent) Assert that the configuration settings forClientRegionShortcut
and the persistent attribute in <gfe:*-region> elements are compatible.static void
assertDataPolicyAndPersistentAttributeAreCompatible
(org.apache.geode.cache.DataPolicy dataPolicy, Boolean persistent) Assert that the configuration settings forDataPolicy
and the persistent attribute in <gfe:*-region> elements are compatible.static boolean
close
(org.apache.geode.cache.Region<?, ?> region) Safely closes the targetRegion
.static boolean
isClient
(org.apache.geode.cache.Region<?, ?> region) Determines whether the targetRegion
is a clientRegion
.static boolean
isCloseable
(org.apache.geode.cache.Region<?, ?> region) Determines whether the givenRegion
is closeable.static boolean
isLocal
(org.apache.geode.cache.Region<?, ?> region) Determines whether the givenRegion
is a non-distributed, localRegion
.static boolean
isServer
(org.apache.geode.cache.Region<?, ?> region) Determines whether the targetRegion
is a server-sideRegion
.static String
toRegionName
(String regionPath) static String
toRegionName
(org.apache.geode.cache.Region<?, ?> region) static String
toRegionPath
(String regionName) static String
toRegionPath
(org.apache.geode.cache.Region<?, ?> region) Methods inherited from class org.springframework.data.gemfire.util.CacheUtils
close, close, close, closeCache, closeClientCache, getCache, getClientCache, isClient, isDefaultPool, isDefaultPool, isDurable, isNotDefaultPool, isNotDefaultPool, isPeer, resolveGemFireCache
Methods inherited from class org.springframework.data.gemfire.util.DistributedSystemUtils
configureDurableClient, getDistributedSystem, getDistributedSystem, getLocator, isConnected, isNotConnected
Methods inherited from class org.springframework.data.gemfire.util.SpringExtensions
addDependsOn, areNotNull, defaultIfEmpty, defaultIfEmpty, defaultIfNull, defaultIfNull, dereferenceBean, equalsIgnoreNull, getBeansOfTypeOrdered, getBeansOfTypeOrdered, getOrder, getOrderedStreamOfBeansByType, getPropertyValue, isMatchingBean, nullOrEquals, nullSafeEquals, nullSafeName, nullSafeSimpleName, nullSafeType, nullSafeType, requireObject, requireObject, safeDoOperation, safeDoOperation, safeGetValue, safeGetValue, safeGetValue, safeGetValue, safeRunOperation, safeRunOperation, setPropertyReference, setPropertyValue
-
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 forClientRegionShortcut
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:
-
ClientRegionShortcutWrapper
ClientRegionShortcut
-
assertDataPolicyAndPersistentAttributeAreCompatible
public static void assertDataPolicyAndPersistentAttributeAreCompatible(org.apache.geode.cache.DataPolicy dataPolicy, Boolean persistent) Assert that the configuration settings forDataPolicy
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 targetRegion
.- 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 targetRegion
is a clientRegion
.- Parameters:
region
-Region
to evaluate.- Returns:
- a boolean indicating whether the target
Region
is a clientRegion
. - See Also:
-
Region
-
isCloseable
public static boolean isCloseable(org.apache.geode.cache.Region<?, ?> region) Determines whether the givenRegion
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 givenRegion
is a non-distributed, localRegion
.- Parameters:
region
-Region
to evaluate.- Returns:
- a boolean value indicating whether the given
Region
is a non-distributed, localRegion
. - See Also:
-
Region
-
toRegionName
-
toRegionName
-
toRegionPath
-
toRegionPath
-
isServer
public static boolean isServer(@Nullable org.apache.geode.cache.Region<?, ?> region) Determines whether the targetRegion
is a server-sideRegion
.- Parameters:
region
-Region
to evaluate.- Returns:
- a boolean indicating whether the target
Region
is a server-sideRegion
. - See Also:
-
Region
-