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