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
028/**
029 * Can be overridden in UT if you only want to implement part of the methods in {@link AsyncTable}.
030 */
031public class DummyAsyncTable<C extends ScanResultConsumerBase> implements AsyncTable<C> {
032
033  @Override
034  public TableName getName() {
035    return null;
036  }
037
038  @Override
039  public Configuration getConfiguration() {
040    return null;
041  }
042
043  @Override
044  public CompletableFuture<TableDescriptor> getDescriptor() {
045    return null;
046  }
047
048  @Override
049  public AsyncTableRegionLocator getRegionLocator() {
050    return null;
051  }
052
053  @Override
054  public long getRpcTimeout(TimeUnit unit) {
055    return 0;
056  }
057
058  @Override
059  public long getReadRpcTimeout(TimeUnit unit) {
060    return 0;
061  }
062
063  @Override
064  public long getWriteRpcTimeout(TimeUnit unit) {
065    return 0;
066  }
067
068  @Override
069  public long getOperationTimeout(TimeUnit unit) {
070    return 0;
071  }
072
073  @Override
074  public long getScanTimeout(TimeUnit unit) {
075    return 0;
076  }
077
078  @Override
079  public CompletableFuture<Result> get(Get get) {
080    return null;
081  }
082
083  @Override
084  public CompletableFuture<Void> put(Put put) {
085    return null;
086  }
087
088  @Override
089  public CompletableFuture<Void> delete(Delete delete) {
090    return null;
091  }
092
093  @Override
094  public CompletableFuture<Result> append(Append append) {
095    return null;
096  }
097
098  @Override
099  public CompletableFuture<Result> increment(Increment increment) {
100    return null;
101  }
102
103  @Override
104  public CheckAndMutateBuilder checkAndMutate(byte[] row, byte[] family) {
105    return null;
106  }
107
108  @Override
109  public CheckAndMutateWithFilterBuilder checkAndMutate(byte[] row, Filter filter) {
110    return null;
111  }
112
113  @Override
114  public CompletableFuture<CheckAndMutateResult> checkAndMutate(CheckAndMutate checkAndMutate) {
115    return null;
116  }
117
118  @Override
119  public List<CompletableFuture<CheckAndMutateResult>>
120    checkAndMutate(List<CheckAndMutate> checkAndMutates) {
121    return null;
122  }
123
124  @Override
125  public CompletableFuture<Result> mutateRow(RowMutations mutation) {
126    return null;
127  }
128
129  @Override
130  public void scan(Scan scan, C consumer) {
131  }
132
133  @Override
134  public ResultScanner getScanner(Scan scan) {
135    return null;
136  }
137
138  @Override
139  public CompletableFuture<List<Result>> scanAll(Scan scan) {
140    return null;
141  }
142
143  @Override
144  public List<CompletableFuture<Result>> get(List<Get> gets) {
145    return null;
146  }
147
148  @Override
149  public List<CompletableFuture<Void>> put(List<Put> puts) {
150    return null;
151  }
152
153  @Override
154  public List<CompletableFuture<Void>> delete(List<Delete> deletes) {
155    return null;
156  }
157
158  @Override
159  public <T> List<CompletableFuture<T>> batch(List<? extends Row> actions) {
160    return null;
161  }
162
163  @Override
164  public <S, R> CompletableFuture<R> coprocessorService(
165    Function<com.google.protobuf.RpcChannel, S> stubMaker, ServiceCaller<S, R> callable,
166    byte[] row) {
167    return null;
168  }
169
170  @Override
171  public <S, R> CoprocessorServiceBuilder<S, R> coprocessorService(
172    Function<com.google.protobuf.RpcChannel, S> stubMaker, ServiceCaller<S, R> callable,
173    CoprocessorCallback<R> callback) {
174    return null;
175  }
176
177}