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.conf.Configuration;
22 import org.apache.hadoop.hbase.Abortable;
23 import org.apache.hadoop.hbase.Stoppable;
24 import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
25
26
27
28
29 public class ReplicationFactory {
30
31 public static ReplicationQueues getReplicationQueues(final ZooKeeperWatcher zk,
32 Configuration conf, Abortable abortable) {
33 return new ReplicationQueuesZKImpl(zk, conf, abortable);
34 }
35
36 public static ReplicationQueuesClient getReplicationQueuesClient(final ZooKeeperWatcher zk,
37 Configuration conf, Abortable abortable) {
38 return new ReplicationQueuesClientZKImpl(zk, conf, abortable);
39 }
40
41 public static ReplicationPeers getReplicationPeers(final ZooKeeperWatcher zk, Configuration conf,
42 Abortable abortable) {
43 return new ReplicationPeersZKImpl(zk, conf, abortable);
44 }
45
46 public static ReplicationTracker getReplicationTracker(ZooKeeperWatcher zookeeper,
47 final ReplicationPeers replicationPeers, Configuration conf, Abortable abortable,
48 Stoppable stopper) {
49 return new ReplicationTrackerZKImpl(zookeeper, replicationPeers, conf, abortable, stopper);
50 }
51 }