public abstract class GemFireUtils
extends java.lang.Object
GemFireUtils
is an abstract, extensible utility class for working with Apache Geode and Pivotal GemFire
objects and types.Cache
,
GemFireCache
,
Region
,
ClientCache
Constructor and Description |
---|
GemFireUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
close(java.io.Closeable obj)
Null-safe method to close the given
Closeable 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 given
ClientRegionShortcut is local only. |
static boolean |
isNonLocalClientRegion(org.apache.geode.cache.Region<?,?> region)
Determines whether the given
Region is a non-local, client Region , a Region
for which a corresponding server Region 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 given
ClientRegionShortcut is a proxy-based shortcut. |
static boolean |
isProxy(org.apache.geode.cache.Region<?,?> region)
Determines whether the given
Region is a PROXY. |
static boolean |
isProxy(org.apache.geode.cache.RegionShortcut shortcut)
Determines whether the
RegionShortcut is a Proxy-based shortcut. |
public static boolean close(java.io.Closeable obj)
Closeable
object.obj
- the Closeable
object to close.Closeable
object is not null and was successfully
closed, otherwise return false.Closeable
public static boolean isClient(@Nullable org.apache.geode.cache.GemFireCache gemfireCache)
gemfireCache
- a reference to the Pivotal GemFire cache.ClientCache
,
GemFireCache
public static boolean isPeer(@Nullable org.apache.geode.cache.GemFireCache gemFireCache)
gemFireCache
- a reference to the Pivotal GemFire cache.Cache
,
GemFireCache
public static boolean isLocal(@Nullable org.apache.geode.cache.client.ClientRegionShortcut shortcut)
ClientRegionShortcut
is local only.shortcut
- ClientRegionShortcut
to evaluate.ClientRegionShortcut
is local or not.ClientRegionShortcut
public static boolean isNonLocalClientRegion(@Nullable org.apache.geode.cache.Region<?,?> region)
Region
is a non-local, client Region
, a Region
for which a corresponding server Region
exists.region
- Region
to evaluate.Region
is a non-local, client Region
,
a Region
for which a corresponding server Region
exists.Region
,
isPoolConfiguredOrHasServerProxy(Region)
public static boolean isProxy(org.apache.geode.cache.client.ClientRegionShortcut shortcut)
ClientRegionShortcut
is a proxy-based shortcut.
"Proxy"-based Regions
keep no local state.shortcut
- ClientRegionShortcut
to evaluate.ClientRegionShortcut
refers to a Proxy-based shortcut.ClientRegionShortcut
public static boolean isProxy(org.apache.geode.cache.Region<?,?> region)
Region
is a PROXY.region
- Region
to evaluate as a PROXY; must not be null.Region
is a PROXY.DataPolicy
,
Region
public static boolean isProxy(org.apache.geode.cache.RegionShortcut shortcut)
RegionShortcut
is a Proxy-based shortcut.
"Proxy"-based Regions
keep no local state.shortcut
- RegionShortcut
to evaluate.RegionShortcut
refers to a Proxy-based shortcut.RegionShortcut