com.gemstone.gemfire.management.internal.Manager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gemfire-core Show documentation
Show all versions of gemfire-core Show documentation
SnappyData store based off Pivotal GemFireXD
/*
* Copyright (c) 2010-2015 Pivotal Software, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You
* may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License. See accompanying
* LICENSE file.
*/
package com.gemstone.gemfire.management.internal;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
/**
* The Manager is a 7.0 JMX Agent which is hosted within a GemFire process.
* Only one instance is allowed per DistributedSystem connection (or loner).
* It's responsible for defining JMX server endpoints for servicing JMX
* clients.
*
* @author Pivotal Software, Inc.
* @since 7.0
*/
public abstract class Manager {
/**
* GemFire Cache implementation
*/
protected GemFireCacheImpl cache;
/**
* depicts whether this node is a Managing node or not
*/
protected volatile boolean running = false;
/**
* depicts whether this node is a Managing node or not
*/
protected volatile boolean stopCacheOps = false;
/**
* This is a single window to manipulate region resources for management
*/
protected ManagementResourceRepo repo;
/**
* Log writer
*/
protected LogWriterI18n logger;
/**
* The concrete implementation of DistributedSystem that provides
* internal-only functionality.
*/
protected InternalDistributedSystem system;
public Manager(ManagementResourceRepo repo , InternalDistributedSystem system, Cache cache){
this.repo = repo;
this.cache = (GemFireCacheImpl)cache;
this.system = system;
logger = InternalDistributedSystem.getLoggerI18n();
}
public abstract boolean isRunning();
public abstract void startManager();
public abstract void stopManager() ;
/**
* For internal use only
*
*/
public ManagementResourceRepo getManagementResourceRepo() {
return repo;
}
}