public class WANOperationsClient extends OperationsClient
| Modifier and Type | Class and Description |
|---|---|
static class |
WANOperationsClient.SenderOperation |
static class |
WANOperationsClient.SenderState |
| Modifier and Type | Field and Description |
|---|---|
WANOperationsClientBB |
bb |
protected int |
keyAllocation |
protected int |
maxKeys |
protected int |
numWanSites |
static String |
SNAPSHOT_FOR_REGION_PREFIX |
static String |
SNAPSHOT_FOR_UNIQUE_KEY_PREFIX |
static String |
SNAPSHOT_VM_FOR_REGION |
protected boolean |
useUniqueKeyPerThread |
protected int |
wanSiteId |
createCallbackPrefix, destroyCallbackPrefix, distLockService, ENTRY_ADD_OPERATION, ENTRY_DESTROY_OPERATION, ENTRY_GET_NEW_OPERATION, ENTRY_GET_OPERATION, ENTRY_INVALIDATE_OPERATION, ENTRY_LOCAL_DESTROY_OPERATION, ENTRY_LOCAL_INVALIDATE_OPERATION, ENTRY_PUTALL_OPERATION, ENTRY_UPDATE_OPERATION, getCallbackPrefix, invalidateCallbackPrefix, LOCK_NAME, LOCK_SERVICE_NAME, lockOperations, lowerThreshold, minTaskGranularityMS, minTaskGranularitySec, numOpsPerTask, PUT_IF_ABSENT_OPERATION, randomValues, regionDestroyCallbackPrefix, regionInvalidateCallbackPrefix, REMOVE_OPERATION, REPLACE_OPERATION, updateCallbackPrefix, upperThreshold, useTransactions, VmIDStr| Constructor and Description |
|---|
WANOperationsClient() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEntry(com.gemstone.gemfire.cache.Region aRegion)
Add a new entry to the given region.
|
void |
checkForTermicationCondition()
Check for termication condition
|
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.
|
void |
doHASenderOperationsAndVerify() |
void |
doSenderOperation(com.gemstone.gemfire.cache.wan.GatewaySender sender) |
void |
doSenderOperations() |
Map |
getBBSnapshot(com.gemstone.gemfire.cache.Region aRegion)
Return aRegion snapshot map from blackboard.
|
Map |
getBBSnapshotForUniqueKeyMap(com.gemstone.gemfire.cache.Region aRegion)
Return aRegion snapshot map from blackboard.
|
protected Object |
getExistingKey(com.gemstone.gemfire.cache.Region aRegion)
Return a random key currently in the given region.
|
protected List |
getExistingKeys(com.gemstone.gemfire.cache.Region aRegion,
int numKeysToGet) |
protected Object |
getNewKey()
Return a new key, never before used in the test.
|
protected int |
getNextUniqueKeyCounter(int limit)
Return unique key counter for current thread.
|
protected String |
getSenderLocalVMId(com.gemstone.gemfire.cache.wan.GatewaySender sender) |
WANOperationsClient.SenderOperation |
getSenderOperation(com.gemstone.gemfire.cache.wan.GatewaySender sender) |
protected WANOperationsClient.SenderOperation |
getSenderOperation(Long whichPrm)
Get a random sender operation using the given hydra parameter.
|
protected WANOperationsClient.SenderState |
getSenderState(com.gemstone.gemfire.cache.wan.GatewaySender sender) |
protected int |
getWanId()
Get the bridge's distributed id (wan id)
|
void |
initialize() |
protected boolean |
isStopPossible(com.gemstone.gemfire.cache.wan.GatewaySender sender) |
protected int |
numThreads()
Gets the total number of threads eligible to run the current task.
|
protected void |
putAll(com.gemstone.gemfire.cache.Region r)
putall a map to the given region.
|
protected void |
putIfAbsent(com.gemstone.gemfire.cache.Region aRegion,
boolean logAddition)
ConcurrentMap API testing
|
protected void |
remove(com.gemstone.gemfire.cache.Region aRegion)
ConcurrentMap API testing
|
protected void |
replace(com.gemstone.gemfire.cache.Region aRegion)
Updates the "first" entry in a given region
|
protected void |
replace(com.gemstone.gemfire.cache.Region aRegion,
Object name)
Updates the entry with the given key (
name) in the given
region. |
protected int |
tgid()
Gets the client's hydra threadgroup id.
|
protected int |
tid()
Gets the client's hydra thread id.
|
protected int |
ttgid()
Gets the client's hydra threadgroup id for the current task.
|
void |
updateBlackboardSnapshot(com.gemstone.gemfire.cache.Region aRegion,
Object key,
Object value,
boolean isRemove) |
protected void |
updateEntry(com.gemstone.gemfire.cache.Region aRegion)
Update an existing entry in the given region.
|
void |
updateSenderStateToBB(com.gemstone.gemfire.cache.wan.GatewaySender sender) |
void |
verifyRegionContents(com.gemstone.gemfire.cache.Region aRegion,
Map expected)
Verify the state of the region and the given expected snapshot.
|
void |
verifySenderOperation(com.gemstone.gemfire.cache.wan.GatewaySender sender) |
void |
verifySenderOperations() |
void |
writeRegionSnapshotToBB() |
createLocatorTask, getKey, getNewKey, getOperation, getRecentKey, getUpdateObject, getValueForKey, initializeOperationsClient, invalidateEntry, remove, startAndConnectLocatorTask, stopLocatorTaskpublic static String SNAPSHOT_FOR_UNIQUE_KEY_PREFIX
public static String SNAPSHOT_FOR_REGION_PREFIX
public static String SNAPSHOT_VM_FOR_REGION
protected boolean useUniqueKeyPerThread
protected int maxKeys
protected int keyAllocation
protected int wanSiteId
protected int numWanSites
public WANOperationsClientBB bb
public void initialize()
protected void doEntryOperations(com.gemstone.gemfire.cache.Region aRegion)
doEntryOperations in class OperationsClientprotected void addEntry(com.gemstone.gemfire.cache.Region aRegion)
addEntry in class OperationsClientaRegion - The region to use for adding a new entry.protected void putIfAbsent(com.gemstone.gemfire.cache.Region aRegion,
boolean logAddition)
putIfAbsent in class OperationsClientprotected void putAll(com.gemstone.gemfire.cache.Region r)
putAll in class OperationsClientaRegion - The region to use for putall a map.protected void destroyEntry(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalDestroy)
destroyEntry in class OperationsClientaRegion - The region to use for destroying an entry.isLocalDestroy - True if the destroy should be local, false otherwise.protected void remove(com.gemstone.gemfire.cache.Region aRegion)
remove in class OperationsClientprotected void updateEntry(com.gemstone.gemfire.cache.Region aRegion)
updateEntry in class OperationsClientaRegion - The region to use for updating an entry.protected void replace(com.gemstone.gemfire.cache.Region aRegion)
replace in class OperationsClientprotected void replace(com.gemstone.gemfire.cache.Region aRegion,
Object name)
name) in the given
region.replace in class OperationsClientprotected Object getNewKey()
getNewKey in class OperationsClientprotected Object getExistingKey(com.gemstone.gemfire.cache.Region aRegion)
getExistingKey in class OperationsClientaRegion - The region to use for getting an existing key (may or may not be a
partitioned region).protected List getExistingKeys(com.gemstone.gemfire.cache.Region aRegion, int numKeysToGet)
getExistingKeys in class OperationsClientprotected int getNextUniqueKeyCounter(int limit)
public Map getBBSnapshotForUniqueKeyMap(com.gemstone.gemfire.cache.Region aRegion)
public Map getBBSnapshot(com.gemstone.gemfire.cache.Region aRegion)
public void updateBlackboardSnapshot(com.gemstone.gemfire.cache.Region aRegion,
Object key,
Object value,
boolean isRemove)
public void writeRegionSnapshotToBB()
public void verifyRegionContents(com.gemstone.gemfire.cache.Region aRegion,
Map expected)
public void doHASenderOperationsAndVerify()
public void doSenderOperations()
public void doSenderOperation(com.gemstone.gemfire.cache.wan.GatewaySender sender)
public WANOperationsClient.SenderOperation getSenderOperation(com.gemstone.gemfire.cache.wan.GatewaySender sender)
protected WANOperationsClient.SenderOperation getSenderOperation(Long whichPrm)
whichPrm - A hydra parameter which specifies random sender operations.public void updateSenderStateToBB(com.gemstone.gemfire.cache.wan.GatewaySender sender)
protected boolean isStopPossible(com.gemstone.gemfire.cache.wan.GatewaySender sender)
protected String getSenderLocalVMId(com.gemstone.gemfire.cache.wan.GatewaySender sender)
public void verifySenderOperations()
public void verifySenderOperation(com.gemstone.gemfire.cache.wan.GatewaySender sender)
protected WANOperationsClient.SenderState getSenderState(com.gemstone.gemfire.cache.wan.GatewaySender sender)
protected int tid()
protected int tgid()
protected int ttgid()
protected int numThreads()
protected int getWanId()
public void checkForTermicationCondition()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.