All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gemstone.gemfire.internal.admin.GfManagerAgent Maven / Gradle / Ivy

There is a newer version: 2.0-BETA
Show newest version
/*
 * 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.internal.admin;

import com.gemstone.gemfire.distributed.internal.DM;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
//import java.util.*;

/**
 * This interface is the point of entry into a GemFire distributed
 * system for the admin API.  It provides methods for discovering the
 * nodes of a system, registering listeners for nodes which join and
 * leave the system, and for accessing known peers of the manager
 * agent to be used for failover.
 */
public interface GfManagerAgent {
    
  /**
   * Disconnects this agent from the distributed system.
   * @return true if this call resulted in being disconnected
   */
  public boolean disconnect();
    
  /**
   * Returns whether or not the agent is connected to the distributed
   * system. 
   */
  public boolean isConnected();

  /**
   * Returns whether or not this manager agent has created admin
   * objects for the initial members of the distributed system.
   *
   * @since 4.0
   */
  public boolean isInitialized();

  /**
   * Returns whether or not the agent is listening for messages from
   * the distributed system.
   */
  public boolean isListening();
    
  /**
   * Returns information about the application VMs that are members of
   * the distributed system.
   */
  public ApplicationVM[] listApplications();

  /**
   * Returns a list of the other distributed systems that this agent
   * knows about.  Currently (GemFire 3.0) the agent does not know
   * about any other distributed systems.
   */
  public GfManagerAgent[] listPeers();
    
  /**
   * Registers a JoinLeaveListener. on this agent that is
   * notified when membership in the distributed system changes.
   */
  public void addJoinLeaveListener( JoinLeaveListener observer );

  /**
   * Sets the CacheCollector to which this agent delivers
   * {@link CacheSnapshot}s.
   */
  public void setCacheCollector(CacheCollector collector);
    
  /**
   * Deregisters a JoinLeaveListener from this agent.
   */
  public void removeJoinLeaveListener( JoinLeaveListener observer );

//   public void addSnapshotListener(SnapshotListener listener);

//   public void removeSnapshotListener(SnapshotListener listener);

  /**
   * Returns the distribution manager used by this manager agent.
   *
   * @since 3.5
   */
  public DM getDM();

  /**
   * Sets the alert level for this manager agent.
   */
  public void setAlertLevel(int level);

  /**
   * Returns the distributed system that is administered by this
   * agent.
   *
   * @since 4.0
   */
  public InternalDistributedSystem getDSConnection();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy