Class GemFireUtils
java.lang.Object
org.springframework.session.data.gemfire.support.GemFireUtils
GemFireUtils
is an abstract, extensible utility class for working with Apache Geode and Pivotal GemFire
objects and types.- Since:
- 1.1.0
- See Also:
-
Cache
GemFireCache
Region
ClientCache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Null-safe method to close the givenCloseable
object.static boolean
isClient
(org.apache.geode.cache.GemFireCache gemfireCache) Determines whether the Pivotal GemFire cache is a client.static boolean
isLocal
(org.apache.geode.cache.client.ClientRegionShortcut shortcut) Determines whether the givenClientRegionShortcut
is local only.static boolean
isNonLocalClientRegion
(org.apache.geode.cache.Region<?, ?> region) Determines whether the givenRegion
is a non-local, clientRegion
, aRegion
for which a corresponding serverRegion
exists.static boolean
isPeer
(org.apache.geode.cache.GemFireCache gemFireCache) Determines whether the Pivotal GemFire cache is a peer.static boolean
isProxy
(org.apache.geode.cache.client.ClientRegionShortcut shortcut) Determines whether the givenClientRegionShortcut
is a proxy-based shortcut.static boolean
isProxy
(org.apache.geode.cache.Region<?, ?> region) Determines whether the givenRegion
is a PROXY.static boolean
isProxy
(org.apache.geode.cache.RegionShortcut shortcut) Determines whether theRegionShortcut
is a Proxy-based shortcut.
-
Constructor Details
-
GemFireUtils
public GemFireUtils()
-
-
Method Details
-
close
Null-safe method to close the givenCloseable
object. -
isClient
public static boolean isClient(@Nullable org.apache.geode.cache.GemFireCache gemfireCache) Determines whether the Pivotal GemFire cache is a client.- Parameters:
gemfireCache
- a reference to the Pivotal GemFire cache.- Returns:
- a boolean value indicating whether the Pivotal GemFire cache is a client.
- See Also:
-
ClientCache
GemFireCache
-
isPeer
public static boolean isPeer(@Nullable org.apache.geode.cache.GemFireCache gemFireCache) Determines whether the Pivotal GemFire cache is a peer.- Parameters:
gemFireCache
- a reference to the Pivotal GemFire cache.- Returns:
- a boolean value indicating whether the Pivotal GemFire cache is a peer.
- See Also:
-
Cache
GemFireCache
-
isLocal
public static boolean isLocal(@Nullable org.apache.geode.cache.client.ClientRegionShortcut shortcut) Determines whether the givenClientRegionShortcut
is local only.- Parameters:
shortcut
-ClientRegionShortcut
to evaluate.- Returns:
- a boolean value indicating whether the
ClientRegionShortcut
is local or not. - See Also:
-
ClientRegionShortcut
-
isNonLocalClientRegion
public static boolean isNonLocalClientRegion(@Nullable org.apache.geode.cache.Region<?, ?> region) Determines whether the givenRegion
is a non-local, clientRegion
, aRegion
for which a corresponding serverRegion
exists.- Parameters:
region
-Region
to evaluate.- Returns:
- a boolean value indicating whether the given
Region
is a non-local, clientRegion
, aRegion
for which a corresponding serverRegion
exists. - See Also:
-
Region
isPoolConfiguredOrHasServerProxy(Region)
-
isProxy
public static boolean isProxy(org.apache.geode.cache.client.ClientRegionShortcut shortcut) Determines whether the givenClientRegionShortcut
is a proxy-based shortcut. "Proxy"-basedRegions
keep no local state.- Parameters:
shortcut
-ClientRegionShortcut
to evaluate.- Returns:
- a boolean value indicating whether the
ClientRegionShortcut
refers to a Proxy-based shortcut. - See Also:
-
ClientRegionShortcut
-
isProxy
public static boolean isProxy(org.apache.geode.cache.Region<?, ?> region) Determines whether the givenRegion
is a PROXY.- Parameters:
region
-Region
to evaluate as a PROXY; must not be null.- Returns:
- a boolean value indicating whether the
Region
is a PROXY. - See Also:
-
DataPolicy
Region
-
isProxy
public static boolean isProxy(org.apache.geode.cache.RegionShortcut shortcut) Determines whether theRegionShortcut
is a Proxy-based shortcut. "Proxy"-basedRegions
keep no local state.- Parameters:
shortcut
-RegionShortcut
to evaluate.- Returns:
- a boolean value indicating whether the
RegionShortcut
refers to a Proxy-based shortcut. - See Also:
-
RegionShortcut
-