public class ListenerTest extends EventTest
ListenerPrms,
ListenerBB| Modifier and Type | Field and Description |
|---|---|
protected static int |
ADD_LISTENER |
protected static int |
INIT_LISTENERS |
protected static int |
REMOVE_LISTENER |
protected static int |
SET_LISTENER |
ADD_OPERATION, CLEAR_OPERATION, createCallbackPrefix, DESTROY_OPERATION, destroyCallbackPrefix, distLockService, eventTest, INVALIDATE_OPERATION, invalidateCallbackPrefix, isCarefulValidation, isListenerTest, isMirrored, isSerialExecution, listenerInstalled, LOCAL_DESTROY_OPERATION, LOCAL_INVALIDATE_OPERATION, LOCK_NAME, LOCK_SERVICE_NAME, lowerThreshold, maxObjects, maxRegions, memberIdString, MILLIS_TO_WAIT, minTaskGranularityMS, minTaskGranularitySec, numVMs, PR_NAME_PREFIX, PUT_IF_ABSENT_OPERATION, PUTALL_OPERATION, rand, randomValues, READ_OPERATION, REGION_CLOSE_OPERATION, regionDestroyCallbackPrefix, regionInvalidateCallbackPrefix, regionName, REMOVE_OPERATION, REPLACE_OPERATION, UPDATE_OPERATION, updateCallbackPrefix, upperThreshold, useCounters, useEvictionController, useTransactions, VmIDStr| Constructor and Description |
|---|
ListenerTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addListener(com.gemstone.gemfire.cache.Region aRegion)
Adds a listener to the existing listener list in the indicated Region
|
protected void |
clearInvokedListenerList(String regionName)
Clears the InvokedListener list in the BB.
|
protected void |
compareListenerLists(String regionName)
Compares the Expected and Invoked Listener Lists in ListenerBB
|
protected void |
doEntryOperation(com.gemstone.gemfire.cache.Region aRegion)
Perform a random entry operation
|
protected void |
doOperation(com.gemstone.gemfire.cache.Region aRegion)
Perform a random region or entry operation
|
protected void |
doRegionOperation(com.gemstone.gemfire.cache.Region aRegion)
Perform a random region operation
|
protected void |
exerciseListeners()
see HydraTask_exerciseListeners
|
protected String |
getCacheListenerNames(com.gemstone.gemfire.cache.Region aRegion)
Utility method to get a string containing the names of the listeners
(separated by ":") for the given region.
|
protected int |
getListenerOp()
Return a random operation to perform on the cacheListenerList.
|
protected com.gemstone.gemfire.cache.CacheListener |
getNewListener()
Returns a new instance of CacheListener for the type given by EventPrms.listeners
|
protected int |
getNumVMsWithListeners()
returns the number of VMs with listeners
In the listener test, we simply assume there is at least one listener
for any region.
|
static void |
HydraTask_exerciseListeners()
HydraTask method to perform listener operations (add, remove, set, init),
stores the expected list of listeners to be invoked in the BB and then
performs a random entry operation.
|
static void |
HydraTask_initialize()
Creates and initializes the singleton
instance of
ListenerTest in this VM. |
protected void |
initListener(com.gemstone.gemfire.cache.Region aRegion)
Initializes the listener list with ListenerPrms.maxListeners entries
|
protected void |
removeListener(com.gemstone.gemfire.cache.Region aRegion)
Removes a listener from the existing listener list in the indicated Region
|
protected void |
setListener(com.gemstone.gemfire.cache.Region aRegion)
Initializes the listener list with a single listener (set vs.
|
protected void |
writeExpectedListenerListToBB(com.gemstone.gemfire.cache.Region aRegion)
Writes the listener list for the indicated region out to the BB
|
addObject, addRegion, addRegion, addToRegion, checkEventCounters, clearRegion, clearRegion, closeRegion, closeRegion, createRootRegions, destroyObject, destroyRegion, destroyRegion, doEntryOperations, doRegionOperations, faultInNewRegions, faultInRegion, getCacheListener, getNumNames, getNumNonRootRegions, getObjectToAdd, getOperation, getPartitionAttributes, getRandomRegion, getUpdateObject, handleRegionDestroyedException, HydraTask_addToRegion, HydraTask_doEntryOperations, HydraTask_doRegionOperations, HydraTask_endTask, HydraTask_iterate, HydraTask_printBB, HydraTask_stopStartVMs, initialize, invalidateObject, invalidateRegion, invalidateRegion, iterateRegion, logExecutionNumber, putIfAbsent, readObject, remove, replace, replace, updateAllObjects, updateObject, updateObject, updateObjects, updateObjects, verifyObjectDestroyed, verifyObjectInvalidated, writeMyRegionNames, writeMyRegionNamesprotected static final int ADD_LISTENER
protected static final int REMOVE_LISTENER
protected static final int INIT_LISTENERS
protected static final int SET_LISTENER
public static void HydraTask_initialize()
ListenerTest in this VM.protected int getNumVMsWithListeners()
getNumVMsWithListeners in class EventTestpublic static void HydraTask_exerciseListeners()
protected void exerciseListeners()
protected void doOperation(com.gemstone.gemfire.cache.Region aRegion)
aRegion - - targeted regionprotected void doEntryOperation(com.gemstone.gemfire.cache.Region aRegion)
aRegion - - targeted regionprotected void doRegionOperation(com.gemstone.gemfire.cache.Region aRegion)
aRegion - - targeted regionprotected int getListenerOp()
protected com.gemstone.gemfire.cache.CacheListener getNewListener()
protected void addListener(com.gemstone.gemfire.cache.Region aRegion)
aRegion - - the targeted region for the listener operationprotected void removeListener(com.gemstone.gemfire.cache.Region aRegion)
aRegion - - the targeted region for the listener operationprotected void initListener(com.gemstone.gemfire.cache.Region aRegion)
aRegion - - the targeted region for the listener operationprotected void setListener(com.gemstone.gemfire.cache.Region aRegion)
aRegion - - the targeted region for the listener operationprotected void writeExpectedListenerListToBB(com.gemstone.gemfire.cache.Region aRegion)
aRegion - - the targeted regionListenerBB.ExpectedListenersprotected void compareListenerLists(String regionName)
regionName - - name of targeted regionListenerBB.ExpectedListeners,
ListenerBB.InvokedListenersprotected String getCacheListenerNames(com.gemstone.gemfire.cache.Region aRegion)
protected void clearInvokedListenerList(String regionName)
regionName - - name of targeted region (for cacheListener & cache Operations)Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.