public abstract class CacheTestCase extends DistributedTestCase
Cache.DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static com.gemstone.gemfire.cache.Cache |
cache
The Cache from which regions are obtained
All references synchronized via
CacheTestCase.class |
logPerTest, reconnect, system, testName| Constructor and Description |
|---|
CacheTestCase(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected CacheSerializableRunnable |
addExceptionTag1(String expectedException) |
static com.gemstone.gemfire.cache.Cache |
basicGetCache()
Return current cache without creating one.
|
static void |
beginCacheXml()
Sets this test up with a CacheCreation as its cache.
|
static void |
cleanDiskDirs() |
protected void |
closeAllCache()
Closed the cache in all VMs.
|
static void |
closeCache()
Close the cache
|
com.gemstone.gemfire.cache.Cache |
createLonerCache()
Creates the
Cache for this test that is not connected
to other members |
com.gemstone.gemfire.cache.Cache |
createMcastCache()
Creates the
Cache for this test that has its own mcast group |
com.gemstone.gemfire.cache.Cache |
createMcastCache(int jgroupsPort)
Creates the
Cache for this test that has its own mcast group |
com.gemstone.gemfire.cache.Region |
createRegion(String name,
com.gemstone.gemfire.cache.RegionAttributes attrs)
Returns a region with the given name and attributes
|
com.gemstone.gemfire.cache.Region |
createRegion(String name,
String rootName,
com.gemstone.gemfire.cache.RegionAttributes attrs) |
protected com.gemstone.gemfire.cache.Region |
createRootRegion(com.gemstone.gemfire.cache.RegionAttributes attrs) |
com.gemstone.gemfire.cache.Region |
createRootRegion(String rootName,
com.gemstone.gemfire.cache.RegionAttributes attrs) |
static void |
disconnectFromDS() |
void |
finishCacheXml(String name)
Finish what beginCacheXml started.
|
void |
finishCacheXml(String name,
String xmlVersion)
Finish what beginCacheXml started.
|
com.gemstone.gemfire.cache.Cache |
getCache()
Return a cache for obtaining regions, created lazily.
|
com.gemstone.gemfire.cache.Cache |
getCache(boolean client) |
com.gemstone.gemfire.cache.Cache |
getCache(boolean client,
com.gemstone.gemfire.cache.CacheFactory cf) |
com.gemstone.gemfire.cache.Cache |
getCache(com.gemstone.gemfire.cache.CacheFactory cf) |
com.gemstone.gemfire.cache.client.ClientCache |
getClientCache(com.gemstone.gemfire.cache.client.ClientCacheFactory factory)
creates a client cache from the factory if one does not already exist
|
static File[] |
getDiskDirs()
Return a set of disk directories
for persistence tests.
|
com.gemstone.gemfire.internal.cache.GemFireCacheImpl |
getGemfireCache()
same as
getCache() but with casting |
com.gemstone.gemfire.internal.cache.InternalRegionArguments |
getInternalRegionArguments()
Provide any internal region arguments, typically required when
internal use (aka meta-data) regions are needed.
|
com.gemstone.gemfire.cache.Region |
getRootRegion() |
com.gemstone.gemfire.cache.Region |
getRootRegion(String rootName) |
static boolean |
hasCache() |
protected static void |
remoteTearDown()
Local destroy all root regions and close the cache.
|
protected CacheSerializableRunnable |
removeExceptionTag1(String expectedException) |
void |
sendSerialMessageToAll()
send an ordered message requiring an ack to all connected members
in order to flush the ordered communication channel
|
void |
sendUnorderedMessageToAll()
send an unordered message requiring an ack to all connected members
in order to flush the unordered communication channel
|
void |
tearDown2()
Tears down the test.
|
addExpectedException, addExpectedException, addHydraProperties, attachDebugger, checkBBFlag, cleanupAllVms, clearBBFlag, crashDistributedSystem, crashDistributedSystem, createLogWriter, disconnectAllFromDS, dumpAllStacks, dumpMyThreads, dumpStack, dumpStack, dumpStack, dumpStackTrace, fail, getAllDistributedSystemProperties, getDistributedSystemProperties, getDUnitLocatorAddress, getDUnitLocatorPort, getDUnitLocatorString, getDUnitLogLevel, getIPLiteral, getLogWriter, getLonerSystem, getMcastSystem, getMcastSystem, getRepeatTimeoutMs, getServerHostName, getSystem, getSystem, getTestClass, getTestName, getUniqueName, getVMCount, incBBFlag, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVMRepeatingIfNecessary, invokeInLocator, invokeRepeatingIfNecessary, isConnectedToDS, join, noteTiming, pause, pause, perVMSetUp, realTearDown, setDiskStoreForGateway, setSystem, setTestName, setUp, staticPause, tearDown, unregisterAllDataSerializersFromAllVms, unregisterDataSerializerInThisVM, unregisterInstantiatorsInThisVM, waitForBBFlag, waitForCriterion, waitMutexassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected static com.gemstone.gemfire.cache.Cache cache
CacheTestCase.classpublic CacheTestCase(String name)
public com.gemstone.gemfire.cache.Cache createLonerCache()
Cache for this test that is not connected
to other memberspublic com.gemstone.gemfire.cache.Cache createMcastCache()
Cache for this test that has its own mcast grouppublic com.gemstone.gemfire.cache.Cache createMcastCache(int jgroupsPort)
Cache for this test that has its own mcast grouppublic static void beginCacheXml()
public void finishCacheXml(String name)
public void finishCacheXml(String name, String xmlVersion)
public final com.gemstone.gemfire.cache.Cache getCache()
public final com.gemstone.gemfire.cache.Cache getCache(com.gemstone.gemfire.cache.CacheFactory cf)
public final com.gemstone.gemfire.cache.Cache getCache(boolean client)
public final com.gemstone.gemfire.cache.Cache getCache(boolean client,
com.gemstone.gemfire.cache.CacheFactory cf)
public final com.gemstone.gemfire.cache.client.ClientCache getClientCache(com.gemstone.gemfire.cache.client.ClientCacheFactory factory)
factory - public final com.gemstone.gemfire.internal.cache.GemFireCacheImpl getGemfireCache()
getCache() but with castingpublic static final boolean hasCache()
public static final com.gemstone.gemfire.cache.Cache basicGetCache()
public static void disconnectFromDS()
public static void closeCache()
protected void closeAllCache()
public void tearDown2()
throws Exception
DistributedTestCaseDistributedTestCase.tearDown() method, and should be over ridden in its place.tearDown2 in class DistributedTestCaseExceptionprotected static void remoteTearDown()
public final com.gemstone.gemfire.cache.Region createRegion(String name, com.gemstone.gemfire.cache.RegionAttributes attrs) throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic com.gemstone.gemfire.internal.cache.InternalRegionArguments getInternalRegionArguments()
public final com.gemstone.gemfire.cache.Region createRegion(String name, String rootName, com.gemstone.gemfire.cache.RegionAttributes attrs) throws com.gemstone.gemfire.cache.CacheException
com.gemstone.gemfire.cache.CacheExceptionpublic final com.gemstone.gemfire.cache.Region getRootRegion()
public final com.gemstone.gemfire.cache.Region getRootRegion(String rootName)
protected final com.gemstone.gemfire.cache.Region createRootRegion(com.gemstone.gemfire.cache.RegionAttributes attrs)
throws com.gemstone.gemfire.cache.RegionExistsException,
com.gemstone.gemfire.cache.TimeoutException
com.gemstone.gemfire.cache.RegionExistsExceptioncom.gemstone.gemfire.cache.TimeoutExceptionpublic final com.gemstone.gemfire.cache.Region createRootRegion(String rootName, com.gemstone.gemfire.cache.RegionAttributes attrs) throws com.gemstone.gemfire.cache.RegionExistsException, com.gemstone.gemfire.cache.TimeoutException
com.gemstone.gemfire.cache.RegionExistsExceptioncom.gemstone.gemfire.cache.TimeoutExceptionpublic void sendUnorderedMessageToAll()
public void sendSerialMessageToAll()
protected CacheSerializableRunnable addExceptionTag1(String expectedException)
protected CacheSerializableRunnable removeExceptionTag1(String expectedException)
public static File[] getDiskDirs()
public static void cleanDiskDirs()
throws IOException
IOExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.