public class DeltaGIITest
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static int |
CACHE_OPERATIONS |
protected static int |
CLEAR_REGION |
protected static java.lang.String |
createCallbackPrefix |
protected static java.lang.String |
destroyCallbackPrefix |
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_PUTALL_OPERATION |
protected static int |
ENTRY_UPDATE_OPERATION |
protected static java.lang.String |
getCallbackPrefix |
protected static java.lang.String |
invalidateCallbackPrefix |
static java.lang.Object |
killSyncObject |
protected static int |
PUTS_FOR_KEY_ORDER_POLICY |
static DeltaGIITest |
testInstance
instance of this test class
|
protected static HydraThreadLocal |
threadIsPaused |
protected static java.lang.String |
updateCallbackPrefix |
protected static java.lang.String |
VMID |
| Constructor and Description |
|---|
DeltaGIITest() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
addEntry(com.gemstone.gemfire.cache.Region theRegion)
Add a new entry to the given region.
|
protected void |
addEntry(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key)
Add a new entry to the given region.
|
protected static void |
checkForLastIteration()
Check if we have run for the desired length of time.
|
protected com.gemstone.gemfire.cache.Region |
clearRegion()
Invoke region.clear() - only one region is cleared during any round of execution
Note that Partitioned Regions do not support clear
|
protected void |
destroyEntry(com.gemstone.gemfire.cache.Region theRegion,
boolean isLocalDestroy)
Destroy an entry in the given region.
|
protected void |
destroyEntry(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key,
boolean isLocalDestroy)
Destroy an entry in the given region.
|
protected void |
doOperations(long msToRun)
Do random operations on the test region
|
protected void |
doOperations(java.lang.Long opsPrm,
long msToRun)
Do random operations on the test region
|
protected void |
getExistingKey(com.gemstone.gemfire.cache.Region theRegion)
Does a get operation on an existing key.
|
protected void |
getNewKey(com.gemstone.gemfire.cache.Region theRegion)
Get a new key int the given region.
|
protected int |
getOperation(java.lang.Long whichPrm)
Get a random operation using the given hydra parameter.
|
protected int |
getOperation(java.lang.Long opsPrm,
com.gemstone.gemfire.cache.Region theRegion)
Get an operation to perform on the region
|
protected java.util.Map |
getPutAllMap(com.gemstone.gemfire.cache.Region theRegion)
Get a map to use for putAll for the given region.
|
static int |
getStat_tombstones(java.lang.String regionName)
Returns the current stat value of CachePerfStats.tombstones This is done by getting the stat directly without going
to the archive file, thus the stat is local to this cache and cannot be combined across archives, but it is faster
than going to the archive.
|
protected void |
getThisNewKey(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key)
Do a get on the given new key.
|
protected java.lang.Object |
getUpdateObject(com.gemstone.gemfire.cache.Region r,
java.lang.String key)
Return an object to be used to update the given key.
|
static void |
HydraTask_addGatewayHub()
Create gateway hub
|
static void |
HydraTask_createGatewayHub()
Create gateway hub
|
static void |
HydraTask_createLocator() |
static void |
HydraTask_doOperations()
Task to do random operations
|
static void |
HydraTask_giiNewMember()
Task for newMembers (increment pausing so we won't wait for these threads).
|
static void |
HydraTask_giiProvider()
Task to control the GII Provider VM (test controller)
|
static void |
HydraTask_giiRequester()
Task to respond to the provider's (controller's) commands
|
static void |
HydraTask_initialize()
Creates and initializes a server or peer.
|
static void |
HydraTask_initializeClient()
Creates and initializes an edge client.
|
static void |
HydraTask_load()
Hydra task to load the region with keys/values (as a batched task)
|
static void |
HydraTask_resetUniqueKeyIndex()
Reset the uniqueKeyIndex to be higher than the current blackboard counter (resulting from load)
|
static void |
HydraTask_startGatewayHub()
Start gateway hub
|
static void |
HydraTask_startLocatorAndDS() |
static void |
HydraTask_stopGatewayHub()
Stop the gateway hub
|
static void |
HydraTask_verifyDeltaGII()
Verify if initialized remotely (via gii) verify that we used deltaGII if expected.
|
static void |
HydraTask_verifyFromSnapshot()
Verify all regions from the snapshot
|
static void |
HydraTask_verifyFromSnapshotAndSync()
Verify region from the snapshot and wait for all threads to complete verify
|
static void |
HydraTask_verifyPR()
Verify regions that are PRs
|
static void |
HydraTask_writeSnapshot() |
protected void |
invalidateEntry(com.gemstone.gemfire.cache.Region theRegion,
boolean isLocalInvalidate)
Invalidate an entry in the given region.
|
protected void |
invalidateEntry(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key,
boolean isLocalInvalidate)
Invalidate an entry in the given region.
|
protected boolean |
isClearedRegion(com.gemstone.gemfire.cache.Region theRegion)
Whether or not the given Region was the target of a Region.clear().
|
protected static long |
logExecutionNumber()
Log the execution number of this serial task.
|
protected java.lang.Object |
obtainExistingKey(com.gemstone.gemfire.cache.Region theRegion)
Return a random key from theRegion
|
protected java.util.List<java.lang.String> |
obtainExistingKeys(com.gemstone.gemfire.cache.Region theRegion,
int numToObtain)
Return a random key from theRegion
|
protected java.lang.Object |
obtainNewKey()
Return a new key, never before used in the test.
|
protected void |
putAll(com.gemstone.gemfire.cache.Region theRegion)
putall a map to the given region.
|
static void |
resetUniqueKeyIndex()
set each newVersion uniqueKey blackboard value to a value higher
than was used in the oldVersion ops to ensure unique keys and
that new keys obtained by newVersion vms have never been used
by oldVersion vms
|
void |
setupGetInitialImageTestCallbacks(java.lang.String giiStatePrm) |
protected void |
updateEntry(com.gemstone.gemfire.cache.Region theRegion)
Update an existing entry in the given region.
|
protected void |
updateEntry(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key)
Update an existing entry in the given region.
|
protected void |
verifyFromSnapshot()
For each region written to the blackboard, verify its state against the region
in this vm.
|
void |
verifyFromSnapshot(com.gemstone.gemfire.cache.Region theRegion,
java.util.Map regionSnapshot)
Verify that the given region is consistent with the given snapshot.
|
protected void |
writeSnapshot()
Write the region snapshot to the BB (includes only persistent regions)
|
public static DeltaGIITest testInstance
protected static HydraThreadLocal threadIsPaused
protected static final java.lang.String VMID
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 static final int ENTRY_PUTALL_OPERATION
protected static final int CACHE_OPERATIONS
protected static final int PUTS_FOR_KEY_ORDER_POLICY
protected static final int CLEAR_REGION
protected static final java.lang.String getCallbackPrefix
protected static final java.lang.String createCallbackPrefix
protected static final java.lang.String updateCallbackPrefix
protected static final java.lang.String invalidateCallbackPrefix
protected static final java.lang.String destroyCallbackPrefix
public static java.lang.Object killSyncObject
public static void HydraTask_createLocator()
throws java.lang.Throwable
java.lang.Throwablepublic static void HydraTask_startLocatorAndDS()
throws java.lang.Throwable
java.lang.Throwablepublic static void HydraTask_createGatewayHub()
public static void HydraTask_addGatewayHub()
public static void HydraTask_startGatewayHub()
public static void HydraTask_stopGatewayHub()
public static void HydraTask_initialize()
throws java.lang.Throwable
java.lang.Throwablepublic static void HydraTask_initializeClient()
throws java.lang.Throwable
java.lang.Throwablepublic void setupGetInitialImageTestCallbacks(java.lang.String giiStatePrm)
public static void HydraTask_load()
public static void HydraTask_resetUniqueKeyIndex()
public static void resetUniqueKeyIndex()
public static void HydraTask_giiProvider()
throws java.lang.Throwable
java.lang.Throwablepublic static void HydraTask_giiRequester()
throws java.lang.Throwable
java.lang.Throwablepublic static void HydraTask_giiNewMember()
throws java.lang.Exception
java.lang.Exceptionpublic static void HydraTask_writeSnapshot()
protected void writeSnapshot()
public static void HydraTask_verifyFromSnapshotAndSync()
public static void HydraTask_verifyFromSnapshot()
protected void verifyFromSnapshot()
public void verifyFromSnapshot(com.gemstone.gemfire.cache.Region theRegion,
java.util.Map regionSnapshot)
theRegion - The region to verifysnapshot - The expected contents of theRegion.public static void HydraTask_verifyPR()
public static void HydraTask_doOperations()
throws java.lang.Exception
java.lang.Exceptionprotected void doOperations(long msToRun)
throws java.lang.Exception
msToRun - The number of milliseconds to run operations before returning.java.lang.Exceptionprotected void doOperations(java.lang.Long opsPrm,
long msToRun)
throws java.lang.Exception
opsPrm - Specifies which list of operations to execute (provider vs. requester operations)msToRun - The number of milliseconds to run operations before returning.java.lang.Exceptionprotected int getOperation(java.lang.Long opsPrm,
com.gemstone.gemfire.cache.Region theRegion)
reg - The region to get an operation for.protected int getOperation(java.lang.Long whichPrm)
whichPrm - A hydra parameter which specifies random operations.protected void getExistingKey(com.gemstone.gemfire.cache.Region theRegion)
theRegion - The region to perform the get on.protected java.lang.Object addEntry(com.gemstone.gemfire.cache.Region theRegion)
theRegion - The region to use for adding a new entry.protected void addEntry(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key)
theRegion - The region to use for adding a new entry.key - The key to add.protected void putAll(com.gemstone.gemfire.cache.Region theRegion)
theRegion - The region to use for putall a map.protected java.util.Map getPutAllMap(com.gemstone.gemfire.cache.Region theRegion)
theRegion - The region to consider for the putAll.protected void invalidateEntry(com.gemstone.gemfire.cache.Region theRegion,
boolean isLocalInvalidate)
theRegion - The region to use for invalidating an entry.isLocalInvalidate - True if the invalidate should be local, false otherwise.protected void invalidateEntry(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key,
boolean isLocalInvalidate)
theRegion - The region to use for invalidating an entry.key - The key to invalidate.isLocalInvalidate - True if the invalidate should be local, false otherwise.protected void destroyEntry(com.gemstone.gemfire.cache.Region theRegion,
boolean isLocalDestroy)
theRegion - The region to use for destroying an entry.isLocalDestroy - True if the destroy should be local, false otherwise.protected void destroyEntry(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key,
boolean isLocalDestroy)
theRegion - The region to use for destroying an entry.key - The key to destroy.isLocalDestroy - True if the destroy should be local, false otherwise.protected void updateEntry(com.gemstone.gemfire.cache.Region theRegion)
theRegion - The region to use for updating an entry.protected void updateEntry(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key)
theRegion - The region to use for updating an entry.key - The key to update.protected void getNewKey(com.gemstone.gemfire.cache.Region theRegion)
theRegion - The region to use for getting an entry.protected void getThisNewKey(com.gemstone.gemfire.cache.Region theRegion,
java.lang.Object key)
theRegion - The region to use for getting an entry.key - A new key never used before.protected java.lang.Object obtainExistingKey(com.gemstone.gemfire.cache.Region theRegion)
theRegion - The region to get the existing key from.protected java.util.List<java.lang.String> obtainExistingKeys(com.gemstone.gemfire.cache.Region theRegion,
int numToObtain)
theRegion - The region to get the existing key from.protected com.gemstone.gemfire.cache.Region clearRegion()
protected boolean isClearedRegion(com.gemstone.gemfire.cache.Region theRegion)
protected java.lang.Object obtainNewKey()
protected java.lang.Object getUpdateObject(com.gemstone.gemfire.cache.Region r,
java.lang.String key)
theRegion - The region which possible contains key.key - The key to get a new value for.public static int getStat_tombstones(java.lang.String regionName)
protected static long logExecutionNumber()
protected static void checkForLastIteration()
public static void HydraTask_verifyDeltaGII()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.