public class CQKnownKeysTest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ADD_NEW_KEY |
protected com.gemstone.gemfire.cache.Region |
aRegion |
protected static boolean |
CQsOn |
protected CQTest |
CQTestInstance |
protected static int |
DESTROY |
protected static int |
FIRST_OP |
protected static int |
GET |
protected static int |
INVALIDATE |
protected boolean |
isBridgeClient |
protected boolean |
isBridgeConfiguration |
protected KeyIntervals |
keyIntervals |
protected static int |
LAST_OP |
protected static int |
LOCAL_DESTROY |
protected static int |
LOCAL_INVALIDATE |
protected long |
minTaskGranularityMS |
protected long |
minTaskGranularitySec |
protected int |
numNewKeys |
protected static int[] |
operations |
protected com.gemstone.gemfire.cache.query.QueryService |
qService |
protected int |
queryDepth |
protected Map |
queryMap |
protected static String |
REGION_NAME |
protected int |
SLEEP_BETWEEN_OPS_MILLIS |
protected boolean |
sleepBetweenOps |
protected static CQKnownKeysTest |
testInstance |
protected int |
totalNumKeys |
protected HydraThreadLocal |
uniqueKeyIndex |
protected static int |
UPDATE_EXISTING_KEY |
protected static int |
verifyQueryCount |
protected static Iterator |
verifyQueryIterator |
protected static boolean |
verifyRegionContentsCompleted |
protected static StringBuffer |
verifyRegionContentsErrStr |
protected static int |
verifyRegionContentsIndex |
protected static String |
VmIDStr |
| Constructor and Description |
|---|
CQKnownKeysTest() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
addNewKey()
Add a new key to REGION_NAME.
|
protected void |
checkContainsKey(Object key,
boolean expected,
String logStr)
Check that containsKey() called on the tests' region has the expected result.
|
protected void |
checkContainsValueForKey(Object key,
boolean expected,
String logStr)
Check that containsValueForKey() called on the tests' region has the expected result.
|
protected void |
checkUpdatedValue(Object key,
Object value)
Check that the value of the given key is expected as an updated value.
|
protected void |
checkValue(Object key,
Object value)
Check that the value of the given key is expected for this test.
|
protected boolean |
destroy()
Destroy a key in region REGION_NAME.
|
void |
doOps(BitSet availableOps)
Do operations on the REGION_NAME's keys using keyIntervals to specify
which keys get which operations.
|
protected boolean |
get()
Do a get on a key in region REGION_NAME.
|
protected int |
getOp(BitSet bs,
int bsSize)
Get a random operation to perform.
|
protected Set |
getRegionKeySet(com.gemstone.gemfire.cache.Region aRegion) |
protected QueryObject |
getValueToAdd(Object key)
Return a value to add to a region for the given key
|
static void |
HydraTask_doOps()
Hydra task to execution ops, then stop scheduling.
|
static void |
HydraTask_initCombineTest() |
static void |
HydraTask_initializeBridgeServer()
Creates and initializes a data store PR in a bridge server.
|
static void |
HydraTask_initializeClient()
Creates and initializes the singleton instance of CQTest in a client
and start the CQs running.
|
static void |
HydraTask_initializeClientWithoutStartingCQs()
Creates and initializes the singleton instance of CQTest in a client
without starting the CQs running.
|
static void |
HydraTask_loadRegion()
Hydra task to initialize a region and load it according to hydra param settings.
|
static void |
HydraTask_startCQsRunning()
Hydra task to start the CQs running for this VM.
|
static void |
HydraTask_verifyQueries()
Hydra task to verify queries on the region after all ops.
|
static void |
HydraTask_verifyQueriesCombine()
Hydra task to verify queries on the region after all ops for
a test where executeWithInitialResults occurs concurrently with
ops.
|
static void |
HydraTask_verifyRegionContents()
Hydra task to verify the contents of the region after all ops.
|
static void |
HydraTask_waitForSilence()
Hydra task to wait for a period of silence (30 seconds) to allow
the server queues to drain to the clients.
|
void |
initializeInstance()
Initialize fields for this instance
|
protected void |
initializeQueryService() |
protected void |
initializeRegion(String regDescriptName)
Create a region with the given region description name.
|
protected boolean |
invalidate()
Invalidate a key in region REGION_NAME.
|
void |
loadRegion()
Load a region with keys and values.
|
protected boolean |
localDestroy()
Locally destroy a key in region REGION_NAME.
|
protected boolean |
localInvalidate()
Locally invalidate a key in region REGION_NAME.
|
protected void |
logNumOps()
Log the number of ops that have completed.
|
protected static void |
registerInterest(com.gemstone.gemfire.cache.Region aRegion)
Register interest with ALL_KEYS, and InterestPolicyResult = KEYS_VALUES
which is equivalent to a full GII.
|
static void |
StartTask_initialize()
Hydra start task to initialize key intervals, which are ranges of
keys which are to have an operation done on them (invalidate, destroy, etc)
|
protected boolean |
updateExistingKey()
Update an existing key in region REGION_NAME.
|
protected void |
verifyQueryResultsCombine()
Verify the result of the CQs registered for this VM.
|
void |
verifyRegionContents()
Verify the contents of the region, taking into account the keys
that were destroyed, invalidated, etc (as specified in keyIntervals)
Throw an error of any problems are detected.
|
protected static CQKnownKeysTest testInstance
protected static final String REGION_NAME
protected int numNewKeys
protected KeyIntervals keyIntervals
protected int totalNumKeys
protected com.gemstone.gemfire.cache.Region aRegion
protected long minTaskGranularitySec
protected long minTaskGranularityMS
protected boolean isBridgeConfiguration
protected boolean isBridgeClient
protected CQTest CQTestInstance
protected HydraThreadLocal uniqueKeyIndex
protected Map queryMap
protected int queryDepth
protected com.gemstone.gemfire.cache.query.QueryService qService
protected static final String VmIDStr
protected static boolean CQsOn
protected boolean sleepBetweenOps
protected final int SLEEP_BETWEEN_OPS_MILLIS
protected static int verifyRegionContentsIndex
protected static StringBuffer verifyRegionContentsErrStr
protected static boolean verifyRegionContentsCompleted
protected static Iterator verifyQueryIterator
protected static int verifyQueryCount
protected static final int INVALIDATE
protected static final int LOCAL_INVALIDATE
protected static final int DESTROY
protected static final int LOCAL_DESTROY
protected static final int UPDATE_EXISTING_KEY
protected static final int GET
protected static final int ADD_NEW_KEY
protected static final int FIRST_OP
protected static final int LAST_OP
protected static final int[] operations
public static void HydraTask_initializeClient()
public static void HydraTask_initializeClientWithoutStartingCQs()
public static void HydraTask_initCombineTest()
public static void HydraTask_initializeBridgeServer()
protected void initializeRegion(String regDescriptName)
regDescriptName - The name of a region description.public void initializeInstance()
public static void StartTask_initialize()
public static void HydraTask_loadRegion()
public static void HydraTask_doOps()
public static void HydraTask_waitForSilence()
public static void HydraTask_startCQsRunning()
public static void HydraTask_verifyRegionContents()
public static void HydraTask_verifyQueries()
public static void HydraTask_verifyQueriesCombine()
public void loadRegion()
public void doOps(BitSet availableOps)
availableOps - - Bits which are true correspond to the operations
that should be executed.protected boolean addNewKey()
protected boolean updateExistingKey()
protected boolean localInvalidate()
protected boolean invalidate()
protected boolean localDestroy()
protected boolean destroy()
protected boolean get()
public void verifyRegionContents()
protected void checkContainsKey(Object key, boolean expected, String logStr)
key - The key to check.expected - The expected result of containsKeylogStr - 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 containsValueForKeylogStr - Used if throwing an error due to an unexpected value.protected void checkValue(Object key, Object value)
key - The key to check.value - The value for the key.logStr - Used if throwing an error due to an unexpected value.protected void checkUpdatedValue(Object key, Object value)
key - The key to check.value - The value for the key.logStr - Used if throwing an error due to an unexpected value.protected void verifyQueryResultsCombine()
protected int getOp(BitSet bs, int bsSize)
bs - True bits correspond to operations available to be chosen.bsSize - The number of bits to consider.protected QueryObject getValueToAdd(Object key)
protected Set getRegionKeySet(com.gemstone.gemfire.cache.Region aRegion)
protected static void registerInterest(com.gemstone.gemfire.cache.Region aRegion)
aRegion - The region to register interest on.protected void initializeQueryService()
protected void logNumOps()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.