public class OperationsClient extends Object
OperationsClientPrms| Modifier and Type | Field and Description |
|---|---|
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_PUTALL_OPERATION |
protected static int |
ENTRY_UPDATE_OPERATION |
protected static String |
getCallbackPrefix |
protected static String |
invalidateCallbackPrefix |
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 |
numOpsPerTask |
protected static int |
PUT_IF_ABSENT_OPERATION |
protected RandomValues |
randomValues |
protected static String |
regionDestroyCallbackPrefix |
protected static String |
regionInvalidateCallbackPrefix |
protected static int |
REMOVE_OPERATION |
protected static int |
REPLACE_OPERATION |
protected static String |
updateCallbackPrefix |
protected int |
upperThreshold |
protected boolean |
useTransactions |
protected static String |
VmIDStr |
| Constructor and Description |
|---|
OperationsClient() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEntry(com.gemstone.gemfire.cache.Region aRegion)
Add a new entry to the given region.
|
static void |
createLocatorTask()
Creates a (disconnected) locator.
|
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.
|
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 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,
Object key)
Return an object to be used to update the given key.
|
BaseValueHolder |
getValueForKey(Object key)
Return a value for the given key
|
void |
initializeOperationsClient() |
protected void |
invalidateEntry(com.gemstone.gemfire.cache.Region aRegion,
boolean isLocalInvalidate)
Invalidate an entry in the given region.
|
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 |
remove(com.gemstone.gemfire.cache.Region aRegion,
Object name,
Object oldVal) |
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. |
static void |
startAndConnectLocatorTask()
Connects a locator to its (admin-only) distributed system.
|
static void |
stopLocatorTask()
Stops a locator.
|
protected void |
updateEntry(com.gemstone.gemfire.cache.Region aRegion)
Update an existing entry in the given region.
|
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 PUT_IF_ABSENT_OPERATION
protected static final int REMOVE_OPERATION
protected static final int REPLACE_OPERATION
protected static final int ENTRY_PUTALL_OPERATION
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
protected long minTaskGranularitySec
protected long minTaskGranularityMS
protected int numOpsPerTask
protected RandomValues randomValues
protected int upperThreshold
protected int lowerThreshold
protected boolean lockOperations
protected com.gemstone.gemfire.distributed.DistributedLockService distLockService
protected boolean useTransactions
public static void createLocatorTask()
public static void startAndConnectLocatorTask()
public static void stopLocatorTask()
public void initializeOperationsClient()
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 putIfAbsent(com.gemstone.gemfire.cache.Region aRegion,
boolean logAddition)
protected void putAll(com.gemstone.gemfire.cache.Region r)
aRegion - The region to use for putall a map.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 remove(com.gemstone.gemfire.cache.Region aRegion)
protected void updateEntry(com.gemstone.gemfire.cache.Region aRegion)
aRegion - The region to use for updating an entry.protected void replace(com.gemstone.gemfire.cache.Region aRegion)
protected void replace(com.gemstone.gemfire.cache.Region aRegion,
Object name)
name) in the
given region.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.public 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, Object key)
aRegion - The region which possible contains key.key - The key to get a new value for.protected int getOperation(Long whichPrm)
whichPrm - A hydra parameter which specifies random operations.protected 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 List getExistingKeys(com.gemstone.gemfire.cache.Region aRegion, int numKeysToGet)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.