public class WANClient extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WANClient.Lock |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
ITERATIONS |
protected static boolean |
killing |
static long |
lastEventReceivedTime |
protected static String |
QUOTES_REGION_NAME |
protected static String |
REGION_NAME |
static boolean |
serverAlive |
protected static String |
TRADES_REGION_NAME |
protected static WANClient.Lock |
workLock |
| Constructor and Description |
|---|
WANClient() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkInvalidKeys(String validKey)
Checking for the security wan sites whether they have received keys not
valid to them
|
protected static void |
checkKeyRegionEntries(String keyPrefix,
long expectedsize)
Check whether a vm has expected entries for the key prefix
|
static void |
checkWriterRegionContentsEmpty()
Check whether the writer sites are having empty region
|
static void |
clientPutSequentialKeysTask()
Clients doing a putSequentialTask after checking whether the primary is a
valid or invalid server
|
static void |
clientValidateSequentialKeysTask()
validation of the edge clients for the sequential keys after checking for
valid and invalid primary servers
|
protected void |
closeCache()
Closes a cache.
|
static void |
closeEdgeClientCacheTask()
Closes an edge cache.
|
static void |
closeMLServerCacheTask() |
static void |
closePeerCacheRandomKeysTask()
Validates and closes a peer cache.
|
static void |
closePeerCacheTask()
Validates and closes a peer cache.
|
static void |
closeServerCacheRandomKeysTask()
Validates and closes a server cache.
|
static void |
closeServerCacheTask()
Validates and closes a server cache.
|
static void |
createAndStartGatewayHubTask()
Starts a gateway hub in a VM that previously created one, after creating
gateways configured based on
CacheServerPrms. |
protected com.gemstone.gemfire.cache.Cache |
createCache(String cacheConfig)
Creates a cache.
|
protected void |
createGatewayHub()
Creates a gateway hub using the
CacheServerPrms. |
static void |
createLocatorTask()
Creates a (disconnected) locator.
|
protected com.gemstone.gemfire.cache.Region |
createRegion(String regionName,
String regionConfig)
Creates a region
|
static void |
createSequentialKeysUsingPutAllTask()
Creates new objects in the cache with a site-globally increasing shared
counter as the key, using putAll.
|
static void |
destroyRandomEntriesTask()
Destroys numEntries randomKeys in REGION_NAME
|
protected static void |
endNoKillZone() |
static void |
HydraCloseTask_regionSizeToBB()
Writes the regionSize to the sharedMap in the BB (distinguished by
clientName).
|
static void |
HydraEndTask_regionSizesEqual()
Compares the regionSizes written to the sharedMap for the specified
servers.
|
static void |
initCQClientTask()
Initializes an edge CQ client based on the
CacheClientPrms. |
static void |
initEdgeClientCacheTask()
Initializes a edge cache based on the
CacheClientPrms. |
static void |
initMLEdgeClientCacheTask()
Initializes an ML edge cache based on the
CacheClientPrms. |
static void |
initMLServerCacheTask()
Initializes an ML server cache based on the
CacheServerPrms. |
protected static void |
initPdxDiskStore()
Create the pdx disk store if one was specified.
|
static void |
initPeerCacheTask()
Initializes a peer cache based on the
CacheClientPrms. |
static void |
initSecurityPeerCacheTask()
Initializes a peer cache based on the
CacheClientPrms. |
static void |
initSecurityServerCacheTask()
Initializes a server cache based on the
CacheServerPrms. |
static void |
initServerCacheTask()
Initializes a server cache based on the
CacheServerPrms. |
static void |
killClient()
Kill the clients
|
static void |
killGatewayHub()
A Hydra TASK that chooses a random gateway hub and kills it.
|
static void |
killServer()
A Hydra TASK that stops a specified server
|
static void |
mentionReferenceInBlackboard()
Mention the reference vm in the blackboard
|
static void |
notifyFarEnd()
A Hydra TASK that makes the caller increment WANBlackboard.farEndReady.
|
static void |
notifyNearEnd()
A Hydra TASK that makes the caller increment WANBlackboard.nearEndReady.
|
static void |
populateRegionTask()
Populates REGION_NAME with numEntries objects
|
protected void |
print(String regionName)
Prints the contents of the local cache.
|
static void |
printKeyListTask()
Prints the keyList (ArrayList
|
static void |
printMLTask()
Prints the contents of the ML client cache as-is.
|
static void |
printSequentialKeysTask()
Prints the contents of the local cache.
|
static void |
printTask()
Prints the contents of the client cache as-is.
|
static void |
putSequentialKeysTask()
Puts integers into the cache with a globally increasing shared counter as the key.
|
static void |
putSequentialKeysTaskForInValid()
Same as the putSequentialKeysTask() but with the keys prefixed with
"invalid"
|
static void |
putSequentialKeysTaskForReader()
Same as the putSequentialKeysTask() but with the keys prefixed with
"reader" Adds the key to the ArrayList
|
static void |
putSequentialKeysTaskForValid()
Same as the putSequentialKeysTask() but with the keys prefixed with "valid"
|
static void |
putSequentialKeysTaskForWriter()
Same as the putSequentialKeysTask() but with the keys prefixed with
"writer" Adds the key to the ArrayList
|
static void |
putSequentialKeysWithBytesTask()
Puts byte[] into the cache with a globally increasing shared counter as the key.
|
static void |
putSequentialKeysWithDrainTask()
Task to
putSequentialKeysTask() then waitForQueuesToDrain(). |
static void |
putSequentialKeyUsingPutAll(com.gemstone.gemfire.cache.Region region,
int sleepMs) |
static void |
putTask()
Puts objects into the cache.
|
static void |
quoteFeederTask() |
static void |
readerDestroyAllKeysTask()
Reader wan site destroys all the keys in its region
|
static void |
recycleServer()
A Hydra TASK that stops/starts a specified server
|
static void |
restartComponent(String comp,
BridgeHelper.Endpoint endpoint) |
static void |
restartServer()
A Hydra TASK that re-starts a specified server
|
static void |
startAndConnectLocatorTask()
Connects a locator to its (admin-only) distributed system.
|
protected com.gemstone.gemfire.cache.server.CacheServer |
startBridgeServer(String bridgeConfig)
Starts a bridge server.
|
protected void |
startGatewayHub(String gatewayConfig)
Starts a gateway hub in a VM that previously created one, after creating
gateways.
|
static void |
startGatewayHubTask()
Starts a gateway hub in a VM that previously created one, after creating
gateways configured based on
CacheServerPrms. |
protected static void |
startKillZone() |
protected static void |
startNoKillZone() |
protected void |
startQueueMonitor()
Starts a thread to monitor queues on the cache.
|
static void |
stopLocatorTask()
Stops a locator.
|
static void |
tradeBurstFeederTask() |
static void |
tradeFeederTask() |
static void |
updateBBandCloseServerCacheTask()
Validates and closes a server cache.
|
static void |
updateEntries()
perform updates
|
static void |
validateEventsReceived()
Validate the events received by the clients with the reference Vm
|
static void |
validateInvalidSequentialKeysTask()
validation for the valid wan clients with the right prefix *
|
static void |
validateMLTask() |
static void |
validateReaderWanSiteEntriesTask()
Validating Reader Wan Sites
|
static void |
validateSequentialKeysCQTask()
Validates the CQEvent counters and SelectResults against expected contents of server region
|
static void |
validateSequentialKeysTask()
Validates the contents of the local cache.
|
static void |
validateTask()
Checks that all client caches see the same final result, being careful to
only look at the cache as-is.
|
static void |
validateValidSequentialKeysTask()
validation for the valid wan clients with the right prefix *
|
static void |
validateWriterWanSiteEntriesTask()
Validating Writer Wan Sites
|
static void |
waitForEvents()
Client task for clients that way indefinitely
|
static void |
waitForFarEnd()
A Hydra TASK that makes the caller wait for WANBlackboard.farEndReady.
|
static void |
waitForListenerSilence()
Task to wait for the listener silence before doing validation tasks.
|
static void |
waitForNearEnd()
A Hydra TASK that makes the caller wait for WANBlackboard.nearEndReady.
|
static void |
waitForQueuesToDrain()
Waits
CacheClientPrms.secToWaitForQueue for queues to drain. |
static void |
writerDestroyCreatedKeysTask()
Writer vms destroying only those keys that it created
|
protected static final String REGION_NAME
protected static final String TRADES_REGION_NAME
protected static final String QUOTES_REGION_NAME
protected static final int ITERATIONS
public static boolean serverAlive
public static long lastEventReceivedTime
protected static boolean killing
protected static WANClient.Lock workLock
public static void createLocatorTask()
public static void startAndConnectLocatorTask()
public static void stopLocatorTask()
public static void initPeerCacheTask()
CacheClientPrms.public static void initSecurityPeerCacheTask()
CacheClientPrms. The task is
same as initPeerCacheTask but it doesnot create GateWayHubpublic static void initServerCacheTask()
CacheServerPrms.public static void initSecurityServerCacheTask()
CacheServerPrms. Looks for
Security credentials if requiredpublic static void initMLServerCacheTask()
CacheServerPrms.public static void startGatewayHubTask()
CacheServerPrms.public static void createAndStartGatewayHubTask()
CacheServerPrms. This is for Security
Test and this creates and starts the gateway hubpublic static void initEdgeClientCacheTask()
CacheClientPrms.public static void initCQClientTask()
CacheClientPrms.public static void initMLEdgeClientCacheTask()
CacheClientPrms.protected com.gemstone.gemfire.cache.Cache createCache(String cacheConfig)
protected com.gemstone.gemfire.cache.Region createRegion(String regionName, String regionConfig)
protected com.gemstone.gemfire.cache.server.CacheServer startBridgeServer(String bridgeConfig)
protected void startQueueMonitor()
protected void createGatewayHub()
CacheServerPrms.protected void startGatewayHub(String gatewayConfig)
public static void putTask()
public static void createSequentialKeysUsingPutAllTask()
throws Exception
Exceptionpublic static void putSequentialKeysWithDrainTask()
throws Exception
putSequentialKeysTask() then waitForQueuesToDrain().Exceptionpublic static void putSequentialKeysTask()
throws Exception
Exceptionpublic static void putSequentialKeyUsingPutAll(com.gemstone.gemfire.cache.Region region,
int sleepMs)
throws Exception
Exceptionpublic static void putSequentialKeysTaskForValid()
throws Exception
Exceptionpublic static void putSequentialKeysTaskForInValid()
throws Exception
Exceptionpublic static void putSequentialKeysTaskForReader()
throws Exception
Exceptionpublic static void putSequentialKeysTaskForWriter()
throws Exception
Exceptionpublic static void clientPutSequentialKeysTask()
throws Exception
Exceptionpublic static void putSequentialKeysWithBytesTask()
throws Exception
Exceptionpublic static void populateRegionTask()
public static void destroyRandomEntriesTask()
public static void updateEntries()
public static void tradeFeederTask()
public static void tradeBurstFeederTask()
public static void quoteFeederTask()
public static void printMLTask()
public static void printTask()
protected void print(String regionName)
public static void printSequentialKeysTask()
throws Exception
Exceptionpublic static void printKeyListTask()
public static void validateTask()
throws Exception
Assumes no two writers ever write the same key concurrently; all writers are in the same thread group, and write only to the key with their hydra threadgroup id; this task is executed by the same threadgroup that did the writing; and all clients are fully mirrored.
Exceptionpublic static void closeEdgeClientCacheTask()
public static void HydraCloseTask_regionSizeToBB()
WANBlackboard.REGION_SIZEpublic static void HydraEndTask_regionSizesEqual()
CacheClientPrms-clientsToComparepublic static void updateBBandCloseServerCacheTask()
throws Exception
Exceptionpublic static void closePeerCacheTask()
throws Exception
Exceptionpublic static void closePeerCacheRandomKeysTask()
throws Exception
Exceptionpublic static void closeServerCacheTask()
throws Exception
Exceptionpublic static void closeMLServerCacheTask()
throws Exception
Exceptionpublic static void closeServerCacheRandomKeysTask()
throws Exception
Exceptionpublic static void validateValidSequentialKeysTask()
throws Exception
Exceptionpublic static void validateInvalidSequentialKeysTask()
throws Exception
Exceptionpublic static void clientValidateSequentialKeysTask()
throws Exception
Exceptionpublic static void validateSequentialKeysTask()
throws Exception
Exceptionpublic static void validateSequentialKeysCQTask()
throws Exception
Exceptionpublic static void waitForQueuesToDrain()
CacheClientPrms.secToWaitForQueue for queues to drain.
Suitable for use as a helper method or hydra task.protected void closeCache()
public static void killServer()
throws ClientVmNotFoundException
ClientVmNotFoundExceptionCacheClientPrms.bridgeKillTargetpublic static void killClient()
public static void restartServer()
throws ClientVmNotFoundException
ClientVmNotFoundExceptionCacheClientPrms.bridgeKillTargetpublic static void recycleServer()
throws ClientVmNotFoundException
ClientVmNotFoundExceptionCacheClientPrms.bridgeKillTargetpublic static void killGatewayHub()
throws ClientVmNotFoundException
ClientVmNotFoundExceptionpublic static void waitForEvents()
MasterController.sleepForMs()public static void restartComponent(String comp, BridgeHelper.Endpoint endpoint) throws ClientVmNotFoundException
ClientVmNotFoundExceptionpublic static void notifyFarEnd()
public static void notifyNearEnd()
public static void waitForFarEnd()
public static void waitForListenerSilence()
public static void mentionReferenceInBlackboard()
public static void validateEventsReceived()
public static void checkInvalidKeys(String validKey)
public static void validateWriterWanSiteEntriesTask()
public static void validateReaderWanSiteEntriesTask()
protected static void checkKeyRegionEntries(String keyPrefix, long expectedsize)
public static void readerDestroyAllKeysTask()
public static void writerDestroyCreatedKeysTask()
public static void checkWriterRegionContentsEmpty()
public static void waitForNearEnd()
protected static void startKillZone()
protected static void startNoKillZone()
protected static void endNoKillZone()
protected static void initPdxDiskStore()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.