public class UseCase3Client
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
allowNulls |
int |
batchSeconds |
long |
batchStartTime |
java.lang.reflect.Method |
batchTerminator |
int |
count |
int |
currentKey |
java.util.List |
interestListBatch |
int |
keyAllocation |
int |
keyAllocationChunkSize |
int |
keyCount |
java.lang.String |
keyType |
long |
lastTaskTerminatorTime |
int |
maxKeys |
int |
numThreads |
java.util.Map<UseCase3Prms.RegionName,java.lang.Integer> |
regionSpec |
GsRandom |
rng |
long |
startTime |
UseCase3Stats |
statistics |
TestTask |
task |
java.lang.reflect.Method |
taskTerminator |
java.lang.Object[] |
terminatorArgs |
int |
tgid |
int |
tid |
int |
ttgid |
long |
workloadStartTime |
| Constructor and Description |
|---|
UseCase3Client() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
all(java.lang.String prefix,
int n,
java.lang.String regionConfigs)
Returns a string that maps each key (prefix1...prefixN) to all of
the region configs, with a comma separating each key-values pair.
|
static void |
bounceTask()
TASK to bounce a server.
|
static void |
closeCacheTask()
INITTASK to close the cache.
|
protected void |
closeStatistics() |
static void |
closeStatisticsTask()
INITTASK to unregister the cache performance and clock skew statistics
objects.
|
static void |
connectTask()
INITTASK to connect to the distributed system.
|
static void |
createAndStartAgentTask()
INITTASK to create and start an agent and connect it to an admin
distributed system.
|
static void |
createAndStartLocatorTask()
INITTASK to create and start a locator and connect it to an admin
distributed system.
|
static void |
createCacheTask()
INITTASK to create the cache.
|
static void |
createDataTask()
INITTASK to create objects of type
cacheperf.UseCase3Prms#objectType. |
static void |
createPoolTask()
INITTASK to create a pool.
|
static void |
createRegionsTask()
INITTASK to create the regions.
|
static void |
disconnectTask()
INITTASK to disconnect from the distributed system.
|
protected boolean |
executeBatchTerminator() |
protected void |
executeTaskTerminator() |
protected java.lang.Object |
executeTerminator(java.lang.reflect.Method m) |
protected int |
getCount()
Gets the count for a thread's workload.
|
protected int |
getCurrentKey()
Gets the current key for a thread's workload.
|
protected int |
getKeyCount()
Gets the key count for a thread's workload.
|
protected java.lang.String |
getKeyType()
Gets the key type for a thread's workload.
|
protected long |
getLastTaskTerminatorTime()
Gets the last task terminator time for a thread's workload.
|
protected java.lang.reflect.Method |
getMethod(java.lang.String className,
java.lang.String methodName) |
protected int |
getNextKey() |
protected GsRandom |
getRNG()
Gets the random number generator.
|
protected long |
getStartTime()
Gets the start time for a thread's workload.
|
protected UseCase3Stats |
getStatistics()
Gets the per-thread performance statistics instance.
|
protected TestTask |
getTask()
Gets the current task.
|
static java.util.List<java.lang.String> |
getTokens(java.lang.String str) |
protected long |
getWorkloadStartTime()
Gets the workload start time for a thread's workload.
|
protected void |
initBatchVariables() |
protected void |
initHydraThreadLocals() |
protected void |
initialize() |
protected void |
initLocalParameters() |
protected void |
initLocalVariables() |
static void |
mixDataTask()
TASK to mix objects.
|
protected static int |
numThreads()
Gets the total number of threads eligible to run the current task.
|
protected static int |
numThreadsInVM()
Gets the number of hydra threads in this vm.
|
static void |
openStatisticsTask()
INITTASK to register the cache performance and clock skew statistics
objects.
|
static void |
putDataTask()
TASK to put objects.
|
static void |
rebalanceTask() |
static void |
registerInterestRegexAllTask()
INITTASK to register interest in all keys using a regular expression.
|
static void |
registerInterestTask()
INITTASK to register interest.
|
protected void |
resetHydraThreadLocals() |
protected void |
setCount(int n)
Sets the count for a thread's workload.
|
protected void |
setCurrentKey(int n)
Sets the current key for a thread's workload.
|
protected void |
setKeyCount(int n)
Sets the key count for a thread's workload.
|
protected void |
setKeyType(java.lang.String t)
Sets the key type for a thread's workload.
|
protected void |
setLastTaskTerminatorTime(long t)
Sets the last task terminator time for a thread's workload.
|
protected void |
setStartTime(long t)
Sets the start time for a thread's workload.
|
protected void |
setStatistics(UseCase3Stats stats)
Sets the per-thread performance statistics instance.
|
protected void |
setWorkloadStartTime(long t)
Sets the workload start time for a thread's workload.
|
static void |
startServerTask()
INITTASK to start the server.
|
static java.lang.String |
subset(java.lang.String prefix,
int n,
int subsetSize1,
java.lang.String regionConfigs1,
int subsetSize2,
java.lang.String regionConfigs2)
Returns a string that maps each key (prefix1...prefixN) to the union of
subsets of each group of region configs, with a comma separating each
key-values pair.
|
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.
|
protected void |
updateHydraThreadLocals() |
public int tid
public int tgid
public int ttgid
public int numThreads
public java.util.List interestListBatch
public long batchStartTime
public boolean allowNulls
public java.util.Map<UseCase3Prms.RegionName,java.lang.Integer> regionSpec
public int batchSeconds
public int keyAllocation
public int keyAllocationChunkSize
public int maxKeys
public java.lang.reflect.Method batchTerminator
public java.lang.reflect.Method taskTerminator
public java.lang.Object[] terminatorArgs
public TestTask task
public UseCase3Stats statistics
public GsRandom rng
public int count
public long startTime
public int keyCount
public int currentKey
public java.lang.String keyType
public long lastTaskTerminatorTime
public long workloadStartTime
public static void createAndStartLocatorTask()
public static void createAndStartAgentTask()
public static void connectTask()
public static void disconnectTask()
public static void openStatisticsTask()
public static void closeStatisticsTask()
protected void closeStatistics()
public static void createCacheTask()
public static void closeCacheTask()
public static void createRegionsTask()
public static void startServerTask()
public static void createPoolTask()
public static void registerInterestTask()
#interestTotalKeys in batches of size UseCase3Prms.interestBatchSize.
A single thread does all of the registrations.public static void registerInterestRegexAllTask()
public static void createDataTask()
cacheperf.UseCase3Prms#objectType.
Each client puts a new object at a new key.public static void putDataTask()
public static void mixDataTask()
public static void bounceTask()
throws ClientVmNotFoundException
UseCase3Prms.stopWaitSec. Synchronously stops the VM using a nice exit,
or a mean kill if UseCase3Prms.useMeanKill is true. Restarts the
VM after UseCase3Prms.restartWaitSec seconds.ClientVmNotFoundExceptionpublic static void rebalanceTask()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionprotected int getNextKey()
protected boolean executeBatchTerminator()
protected void executeTaskTerminator()
protected java.lang.reflect.Method getMethod(java.lang.String className,
java.lang.String methodName)
protected java.lang.Object executeTerminator(java.lang.reflect.Method m)
protected void initialize()
protected void initLocalVariables()
protected void initBatchVariables()
protected void initLocalParameters()
protected void initHydraThreadLocals()
protected void resetHydraThreadLocals()
protected void updateHydraThreadLocals()
protected TestTask getTask()
protected UseCase3Stats getStatistics()
protected void setStatistics(UseCase3Stats stats)
protected int getCount()
protected void setCount(int n)
protected int getKeyCount()
protected void setKeyCount(int n)
protected int getCurrentKey()
protected void setCurrentKey(int n)
protected java.lang.String getKeyType()
protected void setKeyType(java.lang.String t)
protected long getLastTaskTerminatorTime()
protected void setLastTaskTerminatorTime(long t)
protected long getStartTime()
protected void setStartTime(long t)
protected long getWorkloadStartTime()
protected void setWorkloadStartTime(long t)
protected GsRandom getRNG()
public static java.lang.String subset(java.lang.String prefix,
int n,
int subsetSize1,
java.lang.String regionConfigs1,
int subsetSize2,
java.lang.String regionConfigs2)
public static java.lang.String all(java.lang.String prefix,
int n,
java.lang.String regionConfigs)
public static java.util.List<java.lang.String> getTokens(java.lang.String str)
protected int tid()
protected int tgid()
protected int ttgid()
protected static int numThreadsInVM()
protected static int numThreads()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.