public class InterestPolicyTest extends InitImageTest
ADD_NEW_KEY, aRegion, createRegionDurationMS, DESTROY, FIRST_OP, GET, giiDurationMS, INVALIDATE, keyIntervals, LAST_OP, LOCAL_DESTROY, LOCAL_INVALIDATE, LOG_INTERVAL_MILLIS, numNewKeys, operations, PUTALL_NEW_KEY, randomValues, sc, sleepMSAfterOps, supportsConcurrentMap, testInstance, totalNumKeys, UPDATE_EXISTING_KEY| Constructor and Description |
|---|
InterestPolicyTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkContainsKey(Object key,
Boolean expected,
String logStr)
Check that containsKey() called on the region has the expected result.
|
protected void |
checkContainsValueForKey(Object key,
Boolean expected,
String logStr)
Check that containsValueForKey() called on the region has the expected result.
|
protected ExpectedRegionContents |
getDynamicExpected(com.gemstone.gemfire.cache.InterestResultPolicy policy)
Return the expected contents of the region for dynamic tests.
|
protected String |
getRegex()
Return a regular expression that will match any object
name from util.NameFactory.
|
static void |
HydraTask_initialize()
Initialize the single instance of this test class but not a region.
|
static void |
HydraTask_loadRegion()
Hydra task to initialize a region and load it according to hydra param settings.
|
static void |
HydraTask_nondurable_registerInterestAllKeys()
Task to register interest (nondurable) for a durable client with an
interest policy with ALL_KEYS.
|
static void |
HydraTask_nondurable_registerInterestList()
Task to register interest (nondurable) for a durable client with an
interest policy with a list.
|
static void |
HydraTask_nondurable_registerInterestPartialList()
Task to register interest (nondurable) for a durable client with an
interest policy with a list.
|
static void |
HydraTask_nondurable_registerInterestRegex()
Task to register interest (nondurable) for a durable client with an
interest policy.
|
static void |
HydraTask_registerInterestAllKeys()
Task to register interest with an interest policy with ALL_KEYS.
|
static void |
HydraTask_registerInterestList()
Task to register interest with an interest policy with a list.
|
static void |
HydraTask_registerInterestPartialList()
Task to register interest with an interest policy with a list.
|
static void |
HydraTask_registerInterestRegex()
Task to register interest with an interest policy.
|
static void |
HydraTask_registerInterestSingle_ops_RI()
Task to register interest with an interest policy with repeated calls with
a single key.
|
static void |
HydraTask_registerInterestSingle_RI_noops()
Task to register interest with an interest policy with repeated calls with
a single key.
|
static void |
HydraTask_registerInterestSingle_RI_ops()
Task to register interest with an interest policy with repeated calls with
a single key.
|
static void |
HydraTask_registerInterestSingle()
Task to register interest with an interest policy with repeated calls with a
single key.
|
static void |
HydraTask_unRegisterInterestAllKeys()
Task to unregister interest for a durable client with ALL_KEYS.
|
static void |
HydraTask_unRegisterInterestList()
Task to unregister interest for a durable client with a list.
|
static void |
HydraTask_unRegisterInterestPartialList()
Task to unregister interest for a durable client with a partial list.
|
static void |
HydraTask_unRegisterInterestRegex()
Task to unregister interest (Regex) for a durable client
|
static void |
HydraTask_verifyPartialRegionContents_ops_RI()
Task to verify the contents of a region.
|
static void |
HydraTask_verifyPartialRegionContents_RI_noops()
Task to verify the contents of a region.
|
static void |
HydraTask_verifyPartialRegionContents_RI_ops()
Task to verify the contents of a region.
|
static void |
HydraTask_verifyPartialRegionContentsDynamic()
Task to verify the contents of a region for dynamic tests, which
do ops concurrently with a registerInterest call.
|
static void |
HydraTask_verifyRegionContents_ops_RI()
Task to verify the contents of a region when ops occur followed by
a registerInterest.
|
static void |
HydraTask_verifyRegionContents_RI_noops()
Task to verify the contents of a region after a load and a registerInterest,
but before any ops have executed.
|
static void |
HydraTask_verifyRegionContents_RI_ops()
Task to verify the contents of a region when ops come (after
the registerInterest).
|
static void |
HydraTask_verifyRegionContents_UR()
The task used for verifying that the region contents after the Unregister
operation.
|
static void |
HydraTask_verifyRegionContentsDynamic()
Task to verify the contents of a region for dynamic tests, which
do ops concurrently with a registerInterest call.
|
static void |
HydraTask_waitForSilence()
Hydra task to wait for client silence
|
static void |
initBridgeServer()
Initializes the test region in the cache server VM
|
void |
initInstance()
Initialize this test instance
|
static void |
killClient()
Kill the clients by crashing the VMs
|
static void |
killClientWithCacheClose()
Kill the clients by closing the cache with keep-alive option as true
|
static void |
killServer()
Hydra task for recycling the server
|
protected void |
nondurable_registerInterest(Object keysOfInterest)
Used for non_durable registerInterest for durable clients
|
protected void |
nondurable_registerInterestRegex()
Used for non durable register interest of durable clients
|
static void |
recycleClientWithCacheClose()
Kill the clients by closing the cache with keep-alive option as true
re-start and register interest with same interest policy as earlier
|
protected void |
registerInterest(Object keysOfInterest)
Use the given keys of interest, along with an interest policy to call
registerInterest, and then check the contents of the region.
|
protected void |
registerInterestRegex()
Use a regular expression for keys of interest, along with an interest
policy to call registerInterest, and then check the
contents of the region.
|
protected void |
registerInterestSingle(boolean isPartial,
ExpectedRegionContents expected)
Repeatedly call registerInterest with a single key, along with
an interest policy.
|
protected void |
renewSubscription() |
static void |
StartTask_initialize()
Initialize the known keys for this test
|
protected void |
unRegisterInterest(Object keysOfInterest)
Used for unregisterInterest for durable clients
|
protected void |
unRegisterInterestRegex()
Used for unregister interest (Regex) of durable clients
|
static void |
validateEventCounters()
Used for event validation for the interest policy tests.
|
protected void |
verifyEntry(Object key,
boolean isPartial,
ExpectedRegionContents expected)
Verify a single entry in aRegion with the given key
and interest policy KEYS_VALUES.
|
protected void |
verifyRegionContents_UR()
Used for verifying that the region is empty.
|
void |
verifyRegionContents(boolean isPartial,
ExpectedRegionContents expected)
Verify the contents of the region using ExectedRegionContents.
|
addNewKey, blockedGetRegion, checkContainsKey, checkContainsValueForKey, checkUpdatedValue, checkValue, createObject, createObject, destroy, doGetInitImage, doNewKeyGets, doOps, doOpsPlusPuts, get, getCacheLoader, getCacheWriter, getOp, getRegionKeySet, getValueToAdd, hasLocalGiiCompleted, HydraTask_blockedGetRegion, HydraTask_doCacheWriterTest, HydraTask_doGetInitImage, HydraTask_doGetInitImageWithoutMonitor, HydraTask_doNewKeyGets, HydraTask_doOps, HydraTask_doPutAllNewKey, HydraTask_initCache, HydraTask_loadRegionWithGets, HydraTask_verifyCacheWriterTest, HydraTask_verifyEventCounters, HydraTask_verifyGII, HydraTask_verifyNonBlocking, HydraTask_verifyRegionContents, initializeInstance, initializeRegion, initRegion, invalidate, isAnyGiiInProgress, isLocalGiiInProgress, isLocalGiiInProgress, loadRegion, loadRegionWithGets, localDestroy, localInvalidate, putAllNewKey, updateExistingKey, verifyCacheWriterTest, verifyEventCounters, verifyNonBlocking, verifyRegionContents, waitForAllGiiToComplete, waitForAnyGiiToBegin, waitForLocalGiiCompleted, waitForLocalGiiToBeginprotected static final String REGION_NAME
protected static ArrayList keyList
protected static ArrayList partialKeyList
protected static int partial_numDestroyKeys
protected static int partial_numInvalidateKeys
protected static int partial_numUpdateKeys
protected static final int NUM_EXTRA_KEYS
protected static volatile com.gemstone.gemfire.cache.InterestResultPolicy policy
protected static KeyIntervals intervals
protected static int subscription
protected static ExpectedRegionContents static_RI_ops_keysValues
protected static ExpectedRegionContents static_RI_ops_keys
protected static ExpectedRegionContents static_RI_ops_none
protected static ExpectedRegionContents staticPartial_RI_ops_keysValues
protected static ExpectedRegionContents staticPartial_RI_ops_keys
protected static ExpectedRegionContents staticPartial_RI_ops_none
protected static ExpectedRegionContents static_RI_noops_keysValues
protected static ExpectedRegionContents static_RI_noops_keys
protected static ExpectedRegionContents static_RI_noops_none
protected static ExpectedRegionContents staticPartial_RI_noops_keysValues
protected static ExpectedRegionContents staticPartial_RI_noops_keys
protected static ExpectedRegionContents staticPartial_RI_noops_none
protected static ExpectedRegionContents static_ops_RI_keysValues
protected static ExpectedRegionContents static_ops_RI_keys
protected static ExpectedRegionContents static_ops_RI_none
protected static ExpectedRegionContents staticPartial_ops_RI_keysValues
protected static ExpectedRegionContents staticPartial_ops_RI_keys
protected static ExpectedRegionContents staticPartial_ops_RI_none
protected static ExpectedRegionContents dynamicKeysValues
protected static ExpectedRegionContents dynamicKeys
protected static ExpectedRegionContents dynamicNone
protected static ExpectedRegionContents dynamicPartialKeysValues
protected static ExpectedRegionContents dynamicPartialKeys
protected static ExpectedRegionContents dynamicPartialNone
public static void StartTask_initialize()
public static void initBridgeServer()
public static void HydraTask_initialize()
public void initInstance()
initInstance in class InitImageTestpublic static void HydraTask_loadRegion()
public static void killClient()
public static void killClientWithCacheClose()
public static void recycleClientWithCacheClose()
protected void renewSubscription()
public static void HydraTask_registerInterestSingle()
throws Exception
Exceptionpublic static void HydraTask_registerInterestSingle_RI_ops()
throws Exception
Exceptionpublic static void HydraTask_registerInterestSingle_RI_noops()
throws Exception
Exceptionpublic static void HydraTask_registerInterestSingle_ops_RI()
throws Exception
Exceptionpublic static void HydraTask_registerInterestList()
public static void HydraTask_registerInterestPartialList()
public static void HydraTask_registerInterestAllKeys()
public static void HydraTask_registerInterestRegex()
public static void HydraTask_verifyRegionContents_RI_noops()
throws Exception
Exceptionpublic static void HydraTask_verifyRegionContents_RI_ops()
throws Exception
Exceptionpublic static void HydraTask_verifyRegionContents_ops_RI()
throws Exception
Exceptionpublic static void HydraTask_verifyPartialRegionContents_RI_noops()
throws Exception
Exceptionpublic static void HydraTask_verifyPartialRegionContents_RI_ops()
throws Exception
Exceptionpublic static void HydraTask_verifyPartialRegionContents_ops_RI()
throws Exception
Exceptionpublic static void HydraTask_verifyRegionContentsDynamic()
throws Exception
Exceptionpublic static void HydraTask_verifyPartialRegionContentsDynamic()
throws Exception
Exceptionpublic static void HydraTask_waitForSilence()
protected void registerInterestSingle(boolean isPartial,
ExpectedRegionContents expected)
throws Exception
isPartial - If true, we only registered a partial set of keys,
rather than all keys used by the test.
(Used only if verify is true)expected - The expected region contents if we should verify after
each registerInterest call, false otherwise.Exceptionprotected void registerInterest(Object keysOfInterest)
protected void registerInterestRegex()
protected String getRegex()
protected ExpectedRegionContents getDynamicExpected(com.gemstone.gemfire.cache.InterestResultPolicy policy)
policy - The InterestResultPolicy of a registerInterest call.public void verifyRegionContents(boolean isPartial,
ExpectedRegionContents expected)
throws Exception
isPartial - If true, we only registered a partial set of keys,
rather than all keys used by the test.expected - The expected keys/values for the regionExceptionprotected void verifyEntry(Object key, boolean isPartial, ExpectedRegionContents expected) throws Exception
key - The key to verifyisPartial - If true, we only registered even numbered keys.expected - The expected keys/values of the regionExceptionprotected void checkContainsKey(Object key, Boolean expected, String logStr)
key - The key to check.expected - The expected result of containsKey, or null if we cannot
expect any particular result.logStr - Used if throwing an error due to an unexpected value.protected void checkContainsValueForKey(Object key, Boolean expected, String logStr)
key - The key to check.expected - The expected result of containsKey, or null if we cannot
expect any particular result.logStr - Used if throwing an error due to an unexpected value.public static void killServer()
throws ClientVmNotFoundException
ClientVmNotFoundExceptionpublic static void HydraTask_nondurable_registerInterestList()
public static void HydraTask_nondurable_registerInterestPartialList()
public static void HydraTask_nondurable_registerInterestAllKeys()
public static void HydraTask_nondurable_registerInterestRegex()
protected void nondurable_registerInterest(Object keysOfInterest)
protected void nondurable_registerInterestRegex()
public static void HydraTask_unRegisterInterestList()
public static void HydraTask_unRegisterInterestPartialList()
public static void HydraTask_unRegisterInterestAllKeys()
public static void HydraTask_unRegisterInterestRegex()
protected void unRegisterInterest(Object keysOfInterest)
protected void unRegisterInterestRegex()
public static void HydraTask_verifyRegionContents_UR()
protected void verifyRegionContents_UR()
public static void validateEventCounters()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.