001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.hadoop.hbase.client;
019
020import java.util.List;
021import java.util.concurrent.CompletableFuture;
022import java.util.concurrent.TimeUnit;
023import java.util.function.Function;
024import org.apache.hadoop.conf.Configuration;
025import org.apache.hadoop.hbase.TableName;
026import org.apache.hadoop.hbase.filter.Filter;
027
028import org.apache.hbase.thirdparty.com.google.protobuf.RpcChannel;
029
030/**
031 * Can be overridden in UT if you only want to implement part of the methods in {@link AsyncTable}.
032 */
033public class DummyAsyncTable<C extends ScanResultConsumerBase> implements AsyncTable<C> {
034
035  @Override
036  public TableName getName() {
037    return null;
038  }
039
040  @Override
041  public Configuration getConfiguration() {
042    return null;
043  }
044
045  @Override
046  public CompletableFuture<TableDescriptor> getDescriptor() {
047    return null;
048  }
049
050  @Override
051  public AsyncTableRegionLocator getRegionLocator() {
052    return null;
053  }
054
055  @Override
056  public long getRpcTimeout(TimeUnit unit) {
057    return 0;
058  }
059
060  @Override
061  public long getReadRpcTimeout(TimeUnit unit) {
062    return 0;
063  }
064
065  @Override
066  public long getWriteRpcTimeout(TimeUnit unit) {
067    return 0;
068  }
069
070  @Override
071  public long getOperationTimeout(TimeUnit unit) {
072    return 0;
073  }
074
075  @Override
076  public long getScanTimeout(TimeUnit unit) {
077    return 0;
078  }
079
080  @Override
081  public CompletableFuture<Result> get(Get get) {
082    return null;
083  }
084
085  @Override
086  public CompletableFuture<Void> put(Put put) {
087    return null;
088  }
089
090  @Override
091  public CompletableFuture<Void> delete(Delete delete) {
092    return null;
093  }
094
095  @Override
096  public CompletableFuture<Result> append(Append append) {
097    return null;
098  }
099
100  @Override
101  public CompletableFuture<Result> increment(Increment increment) {
102    return null;
103  }
104
105  @Override
106  public CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) {
107    return null;
108  }
109
110  @Override
111  public CheckAndMutateWithFilterBuilder checkAndMutate(byte[] row, Filter filter) {
112    return null;
113  }
114
115  @Override
116  public CompletableFuture<CheckAndMutateResult> checkAndMutate(CheckAndMutate checkAndMutate) {
117    return null;
118  }
119
120  @Override
121  public List<CompletableFuture<CheckAndMutateResult>> checkAndMutate(
122    List<CheckAndMutate> checkAndMutates) {
123    return null;
124  }
125
126  @Override
127  public CompletableFuture<Result> mutateRow(RowMutations mutation) {
128    return null;
129  }
130
131  @Override
132  public void scan(Scan scan, C consumer) {
133  }
134
135  @Override
136  public ResultScanner getScanner(Scan scan) {
137    return null;
138  }
139
140  @Override
141  public CompletableFuture<List<Result>> scanAll(Scan scan) {
142    return null;
143  }
144
145  @Override
146  public List<CompletableFuture<Result>> get(List<Get> gets) {
147    return null;
148  }
149
150  @Override
151  public List<CompletableFuture<Void>> put(List<Put> puts) {
152    return null;
153  }
154
155  @Override
156  public List<CompletableFuture<Void>> delete(List<Delete> deletes) {
157    return null;
158  }
159
160  @Override
161  public <T> List<CompletableFuture<T>> batch(List<? extends Row> actions) {
162    return null;
163  }
164
165  @Override
166  public <S, R> CompletableFuture<R> coprocessorService(Function<RpcChannel, S> stubMaker,
167      ServiceCaller<S, R> callable, byte[] row) {
168    return null;
169  }
170
171  @Override
172  public <S, R> CoprocessorServiceBuilder<S, R> coprocessorService(
173      Function<RpcChannel, S> stubMaker, ServiceCaller<S, R> callable,
174      CoprocessorCallback<R> callback) {
175    return null;
176  }
177}