public class StatAlertDefinitionDUnitTest extends AdminDUnitTestCase
DistributedTestCase.ExpectedException, DistributedTestCase.WaitCriterion, DistributedTestCase.WaitCriterion2| Modifier and Type | Field and Description |
|---|---|
protected static MBeanServerConnection |
mbsc |
protected static ObjectName |
systemName |
agent, AGENT_VM, debug, NUM_RETRY, RETRY_INTERVAL, shutdownThread, tcSystem, urlStringcachelogPerTest, reconnect, system, testName| Constructor and Description |
|---|
StatAlertDefinitionDUnitTest(String name)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static com.gemstone.gemfire.internal.admin.StatAlertDefinition[] |
getAllStatAlertDefinitions()
This is a helper method, which returns all the definitions registered with
the JMX agent.
|
boolean |
isJMX()
Returns whether or not this test exercises JMX behavior.
|
static boolean |
isStatAlertDefinitionCreated(com.gemstone.gemfire.internal.admin.StatAlertDefinition def)
This is a helper method for checking if a stat alert definition is
registered with the JMX agent.
|
protected com.gemstone.gemfire.internal.admin.StatAlertDefinition |
prepareStatAlertDefinition(String name,
com.gemstone.gemfire.internal.admin.statalerts.StatisticInfo[] statisticInfo,
boolean applyFunction,
short functionId,
Number minVal,
Number maxVal)
This is a helper method which prepares a stat alert definition.
|
static void |
registerStatAlertDefinition(com.gemstone.gemfire.internal.admin.StatAlertDefinition def)
This is helper method for registering a given StatAlert Definition with the
JMX agent.
|
static void |
removeStatAlertDefinition(com.gemstone.gemfire.internal.admin.StatAlertDefinition def)
This is a helper method, which removes the specified stat alert definition.
|
void |
setUp()
In addition to the setup done by the superclass, also creates a
DistributedSystem admin object. |
void |
testNoop() |
assertAgent, assertLog, createDistributedSystem, disconnect, getAdminDistributedSystem, getDistributedMember, getDistributionConfig, getLocators, isRMI, isSSL, reconnectToSystem, startAgent, stopAgent, tearDown2addExceptionTag1, basicGetCache, beginCacheXml, cleanDiskDirs, closeAllCache, closeCache, createLonerCache, createMcastCache, createMcastCache, createRegion, createRegion, createRootRegion, createRootRegion, disconnectFromDS, finishCacheXml, finishCacheXml, getCache, getCache, getCache, getCache, getClientCache, getDiskDirs, getGemfireCache, getInternalRegionArguments, getRootRegion, getRootRegion, hasCache, remoteTearDown, removeExceptionTag1, sendSerialMessageToAll, sendUnorderedMessageToAlladdExpectedException, addExpectedException, addHydraProperties, attachDebugger, checkBBFlag, cleanupAllVms, clearBBFlag, crashDistributedSystem, crashDistributedSystem, createLogWriter, disconnectAllFromDS, dumpAllStacks, dumpMyThreads, dumpStack, dumpStack, dumpStack, dumpStackTrace, fail, getAllDistributedSystemProperties, getDistributedSystemProperties, getDUnitLocatorAddress, getDUnitLocatorPort, getDUnitLocatorString, getDUnitLogLevel, getIPLiteral, getLogWriter, getLonerSystem, getMcastSystem, getMcastSystem, getRepeatTimeoutMs, getServerHostName, getSystem, getSystem, getTestClass, getTestName, getUniqueName, getVMCount, incBBFlag, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVM, invokeInEveryVMRepeatingIfNecessary, invokeInLocator, invokeRepeatingIfNecessary, isConnectedToDS, join, noteTiming, pause, pause, perVMSetUp, realTearDown, setDiskStoreForGateway, setSystem, setTestName, staticPause, tearDown, unregisterAllDataSerializersFromAllVms, unregisterDataSerializerInThisVM, unregisterInstantiatorsInThisVM, waitForBBFlag, waitForCriterion, waitMutexassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected static MBeanServerConnection mbsc
protected static ObjectName systemName
public StatAlertDefinitionDUnitTest(String name)
name - Name of the test.public boolean isJMX()
AdminDUnitTestCasefalse.isJMX in class AdminDUnitTestCasepublic void setUp()
throws Exception
AdminDUnitTestCaseDistributedSystem admin object.setUp in class AdminDUnitTestCaseExceptionprotected com.gemstone.gemfire.internal.admin.StatAlertDefinition prepareStatAlertDefinition(String name, com.gemstone.gemfire.internal.admin.statalerts.StatisticInfo[] statisticInfo, boolean applyFunction, short functionId, Number minVal, Number maxVal)
name - Name of the definition.statisticInfo - List of statistics to be included.applyFunction - if we want to apply functionfunctionId - function identifierminVal - minimum threshold level (applicable only in case of Gauge
threshold.)maxVal - maximum threshold level.public static void registerStatAlertDefinition(com.gemstone.gemfire.internal.admin.StatAlertDefinition def)
throws Exception
def - The definition to be registered.Exception - if Error occurres during the registration.public static boolean isStatAlertDefinitionCreated(com.gemstone.gemfire.internal.admin.StatAlertDefinition def)
throws Exception
def - The definition to be checked.Exception - in case of errors.public static com.gemstone.gemfire.internal.admin.StatAlertDefinition[] getAllStatAlertDefinitions()
throws Exception
Exception - in case of errors.public static void removeStatAlertDefinition(com.gemstone.gemfire.internal.admin.StatAlertDefinition def)
throws Exception
def - The definition to be removed.Exception - in case of errors.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.