Search in sources :

Example 56 with SystemManagementService

use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.

the class ManagementTestBase method createSubRegion.

/**
   * Creates a Sub region
   */
protected void createSubRegion(final VM vm, final String parentRegionPath, final String subregionName) throws Exception {
    vm.invoke("Create Sub region", () -> {
        GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
        SystemManagementService service = (SystemManagementService) getManagementService();
        Region region = cache.getRegion(parentRegionPath);
        LogWriterUtils.getLogWriter().info("Creating Sub Region");
        region.createSubregion(subregionName, region.getAttributes());
    });
}
Also used : GemFireCacheImpl(org.apache.geode.internal.cache.GemFireCacheImpl) Region(org.apache.geode.cache.Region) SystemManagementService(org.apache.geode.management.internal.SystemManagementService)

Example 57 with SystemManagementService

use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.

the class ManagementTestRule method startManager.

public void startManager() {
    SystemManagementService service = getSystemManagementService();
    service.createManager();
    service.startManager();
}
Also used : SystemManagementService(org.apache.geode.management.internal.SystemManagementService)

Example 58 with SystemManagementService

use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.

the class ManagementTestBase method createPartitionRegion.

/**
   * Creates a partition Region
   */
protected void createPartitionRegion(final VM vm, final String partitionRegionName) {
    vm.invoke("Create Partitioned region", () -> {
        GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
        SystemManagementService service = (SystemManagementService) getManagementService();
        RegionFactory rf = cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT);
        LogWriterUtils.getLogWriter().info("Creating Par Region");
        rf.create(partitionRegionName);
    });
}
Also used : RegionFactory(org.apache.geode.cache.RegionFactory) GemFireCacheImpl(org.apache.geode.internal.cache.GemFireCacheImpl) SystemManagementService(org.apache.geode.management.internal.SystemManagementService)

Example 59 with SystemManagementService

use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.

the class ManagementTestBase method createLocalRegion.

/**
   * Creates a Local region
   */
protected void createLocalRegion(final VM vm, final String localRegionName) throws Exception {
    vm.invoke("Create Local region", () -> {
        GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
        SystemManagementService service = (SystemManagementService) getManagementService();
        RegionFactory rf = cache.createRegionFactory(RegionShortcut.LOCAL);
        LogWriterUtils.getLogWriter().info("Creating Local Region");
        rf.create(localRegionName);
    });
}
Also used : RegionFactory(org.apache.geode.cache.RegionFactory) GemFireCacheImpl(org.apache.geode.internal.cache.GemFireCacheImpl) SystemManagementService(org.apache.geode.management.internal.SystemManagementService)

Example 60 with SystemManagementService

use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.

the class ManagementTestBase method startManagingNode.

/**
   * Marks a VM as Managing
   */
protected void startManagingNode(final VM vm1) {
    vm1.invoke("Start Being Managing Node", () -> {
        Cache existingCache = GemFireCacheImpl.getInstance();
        // if (existingCache != null && !existingCache.isClosed()) {
        managementService = ManagementService.getManagementService(existingCache);
        SystemManagementService service = (SystemManagementService) managementService;
        service.createManager();
        service.startManager();
    // }
    });
}
Also used : SystemManagementService(org.apache.geode.management.internal.SystemManagementService) Cache(org.apache.geode.cache.Cache)

Aggregations

SystemManagementService (org.apache.geode.management.internal.SystemManagementService)83 ObjectName (javax.management.ObjectName)56 DistributedMember (org.apache.geode.distributed.DistributedMember)31 CacheServerMXBean (org.apache.geode.management.CacheServerMXBean)15 InternalCache (org.apache.geode.internal.cache.InternalCache)14 VM (org.apache.geode.test.dunit.VM)14 TabularResultData (org.apache.geode.management.internal.cli.result.TabularResultData)13 GemFireCacheImpl (org.apache.geode.internal.cache.GemFireCacheImpl)12 ExecutionException (java.util.concurrent.ExecutionException)11 CliMetaData (org.apache.geode.management.cli.CliMetaData)11 Result (org.apache.geode.management.cli.Result)11 CommandResultException (org.apache.geode.management.internal.cli.result.CommandResultException)11 ResourceOperation (org.apache.geode.management.internal.security.ResourceOperation)11 CliCommand (org.springframework.shell.core.annotation.CliCommand)11 CliFunctionResult (org.apache.geode.management.internal.cli.functions.CliFunctionResult)10 WaitCriterion (org.apache.geode.test.dunit.WaitCriterion)8 Test (org.junit.Test)8 GatewaySenderMXBean (org.apache.geode.management.GatewaySenderMXBean)7 CompositeResultData (org.apache.geode.management.internal.cli.result.CompositeResultData)7 DistributedTest (org.apache.geode.test.junit.categories.DistributedTest)7