@Test public void testGetTableAsync() throws Exception { GetTableRequest request = GetTableRequest.newBuilder().setName(TABLE_NAME).build(); when(delegate.getTableAsync(request)).thenReturn(immediateFuture(createTableData())); assertEquals( Table.fromProto(createTableData()), adminClientWrapper.getTableAsync(TABLE_ID).get()); verify(delegate).getTableAsync(request); }
@Override public ApiFuture<Table> getTableAsync(String tableId) { GetTableRequest requestProto = GetTableRequest.newBuilder().setName(instanceName.toTableNameStr(tableId)).build(); return ApiFutureUtil.transformAndAdapt( delegate.getTableAsync(requestProto), new Function<com.google.bigtable.admin.v2.Table, Table>() { @Override public Table apply(com.google.bigtable.admin.v2.Table tableProto) { return Table.fromProto(tableProto); } }); }
AdminClientClassicApi implements AdminClientWrapper { @Override public ApiFuture<Table> getTableAsync(String tableId) { GetTableRequest requestProto = GetTableRequest.newBuilder().setName(instanceName.toTableNameStr(tableId)).build(); return ApiFutureUtil.transformAndAdapt( delegate.getTableAsync(requestProto), new Function<com.google.bigtable.admin.v2.Table, Table>() { @Override public Table apply(com.google.bigtable.admin.v2.Table tableProto) { return Table.fromProto(tableProto); } }); } }
AdminClientClassicApi implements AdminClientWrapper { @Override public ApiFuture<Table> getTableAsync(String tableId) { GetTableRequest requestProto = GetTableRequest.newBuilder().setName(instanceName.toTableNameStr(tableId)).build(); return ApiFutureUtil.transformAndAdapt( delegate.getTableAsync(requestProto), new Function<com.google.bigtable.admin.v2.Table, Table>() { @Override public Table apply(com.google.bigtable.admin.v2.Table tableProto) { return Table.fromProto(tableProto); } }); } AdminClientClassicApi(
      @Nonnull BigtableTableAdminClient delegate, @Nonnull BigtableInstanceName instanceName); }
AdminClientClassicApi implements AdminClientWrapper { @Override public ApiFuture<Table> getTableAsync(String tableId) { GetTableRequest requestProto = GetTableRequest.newBuilder().setName(instanceName.toTableNameStr(tableId)).build(); return ApiFutureUtil.transformAndAdapt( delegate.getTableAsync(requestProto), new Function<com.google.bigtable.admin.v2.Table, Table>() { @Override public Table apply(com.google.bigtable.admin.v2.Table tableProto) { return Table.fromProto(tableProto); } }); } AdminClientClassicApi(
      @Nonnull BigtableTableAdminClient delegate, @Nonnull BigtableInstanceName instanceName); @Override ApiFuture<Table> createTableAsync(CreateTableRequest request); @Override ApiFuture<Table> getTableAsync(String tableId); @Override ApiFuture<List<String>> listTablesAsync(); @Override ApiFuture<Void> deleteTableAsync(String tableId); @Override ApiFuture<Table> modifyFamiliesAsync(ModifyColumnFamiliesRequest request); @Override ApiFuture<Void> dropRowRangeAsync(String tableId, ByteString rowKeyPrefix); @Override ApiFuture<Void> dropAllRowsAsync(String tableId); @Override void close(); }
AdminClientClassicApi implements AdminClientWrapper { @Override public ApiFuture<Table> getTableAsync(String tableId) { GetTableRequest requestProto = GetTableRequest.newBuilder().setName(instanceName.toTableNameStr(tableId)).build(); return ApiFutureUtil.transformAndAdapt( delegate.getTableAsync(requestProto), new Function<com.google.bigtable.admin.v2.Table, Table>() { @Override public Table apply(com.google.bigtable.admin.v2.Table tableProto) { return Table.fromProto(tableProto); } }); } AdminClientClassicApi(
      @Nonnull BigtableTableAdminClient delegate, @Nonnull BigtableInstanceName instanceName); @Override ApiFuture<Table> createTableAsync(CreateTableRequest request); @Override ApiFuture<Table> getTableAsync(String tableId); @Override ApiFuture<List<String>> listTablesAsync(); @Override ApiFuture<Void> deleteTableAsync(String tableId); @Override ApiFuture<Table> modifyFamiliesAsync(ModifyColumnFamiliesRequest request); @Override ApiFuture<Void> dropRowRangeAsync(String tableId, ByteString rowKeyPrefix); @Override ApiFuture<Void> dropAllRowsAsync(String tableId); @Override void close();  }