1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.hadoop.hbase.replication;
20
21 import org.apache.hadoop.hbase.classification.InterfaceAudience;
22 import org.apache.hadoop.conf.Configuration;
23 import org.apache.hadoop.hbase.Abortable;
24 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
25 import org.apache.hadoop.hbase.Stoppable;
26 import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
27
28
29
30
31 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.REPLICATION)
32 public class ReplicationFactory {
33
34 public static ReplicationQueues getReplicationQueues(final ZooKeeperWatcher zk,
35 Configuration conf, Abortable abortable) {
36 return new ReplicationQueuesZKImpl(zk, conf, abortable);
37 }
38
39 public static ReplicationQueuesClient getReplicationQueuesClient(final ZooKeeperWatcher zk,
40 Configuration conf, Abortable abortable) {
41 return new ReplicationQueuesClientZKImpl(zk, conf, abortable);
42 }
43
44 public static ReplicationPeers getReplicationPeers(final ZooKeeperWatcher zk, Configuration conf,
45 Abortable abortable) {
46 return new ReplicationPeersZKImpl(zk, conf, abortable);
47 }
48
49 public static ReplicationTracker getReplicationTracker(ZooKeeperWatcher zookeeper,
50 final ReplicationPeers replicationPeers, Configuration conf, Abortable abortable,
51 Stoppable stopper) {
52 return new ReplicationTrackerZKImpl(zookeeper, replicationPeers, conf, abortable, stopper);
53 }
54 }