public class ForcedDiscTest extends Object
| Modifier and Type | Field and Description |
|---|---|
com.gemstone.gemfire.cache.Region |
aRegion |
protected static String |
createCallbackPrefix |
protected static String |
destroyCallbackPrefix |
protected com.gemstone.gemfire.distributed.DistributedLockService |
distLockService |
protected static int |
ENTRY_ADD_OPERATION |
protected static int |
ENTRY_DESTROY_OPERATION |
protected static int |
ENTRY_GET_NEW_OPERATION |
protected static int |
ENTRY_GET_OPERATION |
protected static int |
ENTRY_INVALIDATE_OPERATION |
protected static int |
ENTRY_LOCAL_DESTROY_OPERATION |
protected static int |
ENTRY_LOCAL_INVALIDATE_OPERATION |
protected static int |
ENTRY_UPDATE_OPERATION |
protected boolean |
expectingForcedDisconnect |
protected static String |
getCallbackPrefix |
protected static String |
invalidateCallbackPrefix |
protected boolean |
isBridgeClient |
protected boolean |
isBridgeConfiguration |
protected static String |
LOCK_NAME |
protected static String |
LOCK_SERVICE_NAME |
protected boolean |
lockOperations |
protected int |
lowerThreshold |
protected long |
minTaskGranularityMS |
protected long |
minTaskGranularitySec |
protected int |
numExceptionThreads |
protected int |
numOpsPerTask |
protected int |
numVMsToStop |
protected RandomValues |
randomValues |
protected static String |
regionDestroyCallbackPrefix |
protected static String |
regionInvalidateCallbackPrefix |
protected int |
secondsToRun |
protected static Object |
syncObject |
static ForcedDiscTest |
testInstance |
protected static String |
updateCallbackPrefix |
protected int |
upperThreshold |
protected static String |
VmIDStr |
| Constructor and Description |
|---|
ForcedDiscTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEntry(com.gemstone.gemfire.cache.Region aRegion)
Add a new entry to the given region.
|
protected void |
causeForcedDisconnect()
Attempt to cause a forced disconnect in the current vm, either through a
slow listener with playDead or by becoming sick with playDead.
|
protected void |
checkForLastIteration()
Check if we have run for the desired length of time.
|
protected void |
checkForTimeToStop()
If we have a signal to stop, then throw StopSchedulingOrder
|
protected void |
cycleWellness()
Allow conditions for a forced disconnect, then
reinitialize after the forced disconnect without waiting for other
threads to get exception from the forced disconnect.
|
protected void |
destroyEntry(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalDestroy)
Destroy an entry in the given region.
|
protected void |
doEntryOperations(com.gemstone.gemfire.cache.Region aRegion)
Do random entry operations on the given region ending either with
minTaskGranularityMS or numOpsPerTask.
|
static Object |
getExistingKey(com.gemstone.gemfire.cache.Region aRegion)
Return a random key currently in the given region.
|
protected void |
getKey(com.gemstone.gemfire.cache.Region aRegion)
Get an existing key in the given region if one is available,
otherwise get a new key.
|
protected Object |
getNewKey()
Return a new key, never before used in the test.
|
protected void |
getNewKey(com.gemstone.gemfire.cache.Region aRegion)
Get a new key int the given region.
|
protected int |
getOperation(Long whichPrm)
Get a random operation using the given hydra parameter.
|
protected Object |
getRecentKey(com.gemstone.gemfire.cache.Region aRegion,
int recentHistory)
Return a random recently used key.
|
protected BaseValueHolder |
getUpdateObject(com.gemstone.gemfire.cache.Region aRegion,
String key)
Return an object to be used to update the given key.
|
protected BaseValueHolder |
getValueForKey(Object key)
Return a value for the given key
|
protected void |
handleException(Exception anExcept)
Handle an exception thrown by doing general operations while
a forced disconnect occurs.
|
protected void |
handleExceptionWithCycleWellness(Exception anExcept)
Handle an exception thrown by doing general operations while
a forced disconnect occurs.
|
static void |
HydraTask_causeForcedDisconnect()
Cause a forced disconnect in the current vm.
|
static void |
HydraTask_cycleWellness()
Allow conditions for a forced disconnect in the current vm,
then reinitialize without regard for what other threads in
this vm is doing.
|
static void |
HydraTask_doEntryOps()
Hydra task method to do random entry operations.
|
static void |
HydraTask_doEntryOpsWithCycleWellness()
Hydra task method to do random entry operations in a fd test.
|
static void |
HydraTask_initializeClient()
Creates and initializes the singleton instance of ForcedDiscTest in this VM.
|
static void |
HydraTask_initializeServer()
Creates and initializes the singleton instance of ForcedDiscTest in this VM.
|
void |
initializeInstance()
Initialize this test instance
|
void |
initializeRegion(String regDescriptName)
Create a region with the given region description name.
|
protected void |
invalidateEntry(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalInvalidate)
Invalidate an entry in the given region.
|
protected static void |
logExecutionNumber()
Log the execution number of this serial task.
|
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.
|
protected void |
reinitialize()
Reinitialize either a client or server, depending on which this vm is.
|
protected void |
reinitializeClient() |
protected void |
reinitializeServer() |
protected void |
updateEntry(com.gemstone.gemfire.cache.Region aRegion)
Update an existing entry in the given region.
|
public static ForcedDiscTest testInstance
protected static final int ENTRY_ADD_OPERATION
protected static final int ENTRY_DESTROY_OPERATION
protected static final int ENTRY_INVALIDATE_OPERATION
protected static final int ENTRY_LOCAL_DESTROY_OPERATION
protected static final int ENTRY_LOCAL_INVALIDATE_OPERATION
protected static final int ENTRY_UPDATE_OPERATION
protected static final int ENTRY_GET_OPERATION
protected static final int ENTRY_GET_NEW_OPERATION
protected long minTaskGranularitySec
protected long minTaskGranularityMS
protected int numOpsPerTask
protected RandomValues randomValues
public com.gemstone.gemfire.cache.Region aRegion
protected int upperThreshold
protected int lowerThreshold
protected int numVMsToStop
protected int secondsToRun
protected boolean lockOperations
protected com.gemstone.gemfire.distributed.DistributedLockService distLockService
protected boolean isBridgeConfiguration
protected boolean isBridgeClient
protected boolean expectingForcedDisconnect
protected int numExceptionThreads
protected static Object syncObject
protected static String LOCK_SERVICE_NAME
protected static String LOCK_NAME
protected static final String getCallbackPrefix
protected static final String createCallbackPrefix
protected static final String updateCallbackPrefix
protected static final String invalidateCallbackPrefix
protected static final String destroyCallbackPrefix
protected static final String regionInvalidateCallbackPrefix
protected static final String regionDestroyCallbackPrefix
protected static final String VmIDStr
public static void HydraTask_initializeClient()
public static void HydraTask_initializeServer()
public void initializeInstance()
public void initializeRegion(String regDescriptName)
regDescriptName - The name of a region description.protected void reinitializeClient()
protected void reinitializeServer()
protected void reinitialize()
public static void HydraTask_doEntryOps()
public static void HydraTask_causeForcedDisconnect()
public static void HydraTask_cycleWellness()
public static void HydraTask_doEntryOpsWithCycleWellness()
protected void doEntryOperations(com.gemstone.gemfire.cache.Region aRegion)
protected void addEntry(com.gemstone.gemfire.cache.Region aRegion)
aRegion - The region to use for adding a new entry.protected void invalidateEntry(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalInvalidate)
aRegion - The region to use for invalidating an entry.isLocalInvalidate - True if the invalidate should be local, false otherwise.protected void destroyEntry(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalDestroy)
aRegion - The region to use for destroying an entry.isLocalDestroy - True if the destroy should be local, false otherwise.protected void updateEntry(com.gemstone.gemfire.cache.Region aRegion)
aRegion - The region to use for updating an entry.protected void getKey(com.gemstone.gemfire.cache.Region aRegion)
aRegion - The region to use for getting an entry.protected void getNewKey(com.gemstone.gemfire.cache.Region aRegion)
aRegion - The region to use for getting an entry.protected void causeForcedDisconnect()
protected void cycleWellness()
protected BaseValueHolder getValueForKey(Object key)
protected Object getNewKey()
protected Object getRecentKey(com.gemstone.gemfire.cache.Region aRegion, int recentHistory)
aRegion - The region to use for getting a recently used key.recentHistory - The number of most recently used keys to consider
for returning.protected BaseValueHolder getUpdateObject(com.gemstone.gemfire.cache.Region aRegion, String key)
aRegion - The region which possible contains key.key - The key to get a new value for.protected static void logExecutionNumber()
protected int getOperation(Long whichPrm)
whichPrm - A hydra parameter which specifies random operations.protected static void registerInterest(com.gemstone.gemfire.cache.Region aRegion)
public static Object getExistingKey(com.gemstone.gemfire.cache.Region aRegion)
aRegion - The region to use for getting an existing key (may
or may not be a partitioned region).protected void checkForLastIteration()
protected void handleException(Exception anExcept)
protected void checkForTimeToStop()
protected void handleExceptionWithCycleWellness(Exception anExcept)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.