001/*
002 *
003 * Licensed to the Apache Software Foundation (ASF) under one
004 * or more contributor license agreements.  See the NOTICE file
005 * distributed with this work for additional information
006 * regarding copyright ownership.  The ASF licenses this file
007 * to you under the Apache License, Version 2.0 (the
008 * "License"); you may not use this file except in compliance
009 * with the License.  You may obtain a copy of the License at
010 *
011 *     http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 */
019package org.apache.hadoop.hbase.replication;
020
021import org.apache.hadoop.conf.Configuration;
022import org.apache.hadoop.hbase.Abortable;
023import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
024import org.apache.yetus.audience.InterfaceAudience;
025
026/**
027 * Wrapper around common arguments used to construct ReplicationQueues. Used to construct various
028 * ReplicationQueues Implementations with different constructor arguments by reflection.
029 */
030@InterfaceAudience.Private
031public class ReplicationQueuesArguments {
032
033  private ZKWatcher zk;
034  private Configuration conf;
035  private Abortable abort;
036
037  public ReplicationQueuesArguments(Configuration conf, Abortable abort) {
038    this.conf = conf;
039    this.abort = abort;
040  }
041
042  public ReplicationQueuesArguments(Configuration conf, Abortable abort, ZKWatcher zk) {
043    this(conf, abort);
044    setZk(zk);
045  }
046
047  public ZKWatcher getZk() {
048    return zk;
049  }
050
051  public void setZk(ZKWatcher zk) {
052    this.zk = zk;
053  }
054
055  public Configuration getConf() {
056    return conf;
057  }
058
059  public void setConf(Configuration conf) {
060    this.conf = conf;
061  }
062
063  public Abortable getAbortable() {
064    return abort;
065  }
066
067  public void setAbortable(Abortable abort) {
068    this.abort = abort;
069  }
070}