1 /* 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 */ 19 package org.apache.hadoop.hbase.replication; 20 21 import java.util.List; 22 23 import org.apache.hadoop.hbase.classification.InterfaceAudience; 24 25 /** 26 * The replication listener interface can be implemented if a class needs to subscribe to events 27 * generated by the ReplicationTracker. These events include things like addition/deletion of peer 28 * clusters or failure of a local region server. To receive events, the class also needs to register 29 * itself with a Replication Tracker. 30 */ 31 @InterfaceAudience.Private 32 public interface ReplicationListener { 33 34 /** 35 * A region server has been removed from the local cluster 36 * @param regionServer the removed region server 37 */ 38 public void regionServerRemoved(String regionServer); 39 40 /** 41 * A peer cluster has been removed (i.e. unregistered) from replication. 42 * @param peerId The peer id of the cluster that has been removed 43 */ 44 public void peerRemoved(String peerId); 45 46 /** 47 * The list of registered peer clusters has changed. 48 * @param peerIds A list of all currently registered peer clusters 49 */ 50 public void peerListChanged(List<String> peerIds); 51 }