public abstract class GemFireUtils
extends java.lang.Object
| 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(com.gemstone.gemfire.cache.GemFireCache gemFireCache)
Determines whether the GemFire cache is a client.
|
static boolean |
isLocal(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
Determines whether the given
ClientRegionShortcut is local only. |
static boolean |
isPeer(com.gemstone.gemfire.cache.GemFireCache gemFireCache)
Determines whether the GemFire cache is a peer.
|
static boolean |
isProxy(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
Determines whether the client
ClientRegionShortcut is a proxy-based
shortcut. |
static boolean |
isProxy(com.gemstone.gemfire.cache.Region<?,?> region)
Determines whether the given
Region is a PROXY, which would be indicated by the Region
having a DataPolicy of DataPolicy.EMPTY. |
static boolean |
isProxy(com.gemstone.gemfire.cache.RegionShortcut shortcut)
Determines whether the peer
RegionShortcut is a proxy-based shortcut. |
static java.lang.String |
toRegionPath(java.lang.String regionName)
Converts a
Region name to a Region path. |
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.Closeablepublic static boolean isClient(com.gemstone.gemfire.cache.GemFireCache gemFireCache)
gemFireCache - a reference to the GemFire cache.ClientCache,
GemFireCachepublic static boolean isPeer(com.gemstone.gemfire.cache.GemFireCache gemFireCache)
gemFireCache - a reference to the GemFire cache.Cache,
GemFireCachepublic static boolean isLocal(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
ClientRegionShortcut is local only.shortcut - the ClientRegionShortcut to evaluate.ClientRegionShortcut is local or
not.ClientRegionShortcutpublic static boolean isProxy(com.gemstone.gemfire.cache.client.ClientRegionShortcut shortcut)
ClientRegionShortcut is a proxy-based
shortcut. NOTE: "proxy"-based Regions keep no local state.shortcut - the client ClientRegionShortcut to evaluate.ClientRegionShortcut
refers to a proxy-based shortcut.ClientRegionShortcutpublic static boolean isProxy(com.gemstone.gemfire.cache.Region<?,?> region)
Region is a PROXY, which would be indicated by the Region
having a DataPolicy of DataPolicy.EMPTY.region - Region to evaluate.Region is a PROXY.DataPolicy,
Regionpublic static boolean isProxy(com.gemstone.gemfire.cache.RegionShortcut shortcut)
RegionShortcut is a proxy-based shortcut. NOTE:
"proxy"-based Regions keep no local state.shortcut - the peer RegionShortcut to evaluate.RegionShortcut refers
to a proxy-based shortcut.RegionShortcutpublic static java.lang.String toRegionPath(java.lang.String regionName)
Region name to a Region path.regionName - a String specifying the name of the Region.Region by name.Region.getFullPath(),
Region.getName()