|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.icegem.utils.CacheUtils
public class CacheUtils
Help class for common operations with regions.
| Constructor Summary | |
|---|---|
CacheUtils()
|
|
| Method Summary | ||
|---|---|---|
static java.lang.String |
addQueryLimit(java.lang.String queryString,
int queryLimit)
Limits query results. |
|
static void |
clearRegion(com.gemstone.gemfire.cache.Region<?,?> region)
Clears all types of regions. |
|
static java.lang.String[] |
getFirstLocatorFromLocatorsString(java.lang.String locatorsString)
Returns first locator host and port from locators string. |
|
static int |
getRegionSize(com.gemstone.gemfire.cache.Region<?,?> region)
Returns approximate number of entries in the region. |
|
static
|
removeAll(com.gemstone.gemfire.cache.Region<K,?> region,
java.util.Set<K> keys)
Removes several entries from region in a single hop. |
|
static
|
retryWithExponentialBackoff(Retryable<T> runnable,
int maxRetries)
Retries passed operation with random exponential back off delay. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheUtils()
| Method Detail |
|---|
public static java.lang.String addQueryLimit(java.lang.String queryString,
int queryLimit)
queryString - Query string.
public static java.lang.String[] getFirstLocatorFromLocatorsString(java.lang.String locatorsString)
locatorsString - of type String
public static void clearRegion(com.gemstone.gemfire.cache.Region<?,?> region)
region - partitioned regionpublic static int getRegionSize(com.gemstone.gemfire.cache.Region<?,?> region)
region - Region.
public static <K> void removeAll(com.gemstone.gemfire.cache.Region<K,?> region,
java.util.Set<K> keys)
K - key type.region - the region to remove entries.keys - the keys of entries to remove.
public static <T> T retryWithExponentialBackoff(Retryable<T> runnable,
int maxRetries)
throws java.lang.InterruptedException,
OperationRetryFailedException
T - Type of returned value.runnable - the operation.maxRetries - the maximum number of retries.
OperationRetryFailedException
java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||