@Test public void testModifyFamiliesAsync() throws Exception { ModifyColumnFamiliesRequest request = ModifyColumnFamiliesRequest.of(TABLE_ID) .addFamily(COLUMN_FAMILY, GCRULES.maxVersions(1)) .updateFamily(UPDATE_FAMILY, GCRULES.maxAge(Duration.ofHours(100))); when(delegate.modifyColumnFamilyAsync(request.toProto(PROJECT_ID, INSTANCE_ID))) .thenReturn(immediateFuture(createTableData())); Future<Table> response = adminClientWrapper.modifyFamiliesAsync(request); assertEquals(Table.fromProto(createTableData()), response.get()); verify(delegate).modifyColumnFamilyAsync(request.toProto(PROJECT_ID, INSTANCE_ID)); }
@Override public ApiFuture<Table> modifyFamiliesAsync(ModifyColumnFamiliesRequest request) { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest modifyColumnRequestProto = request.toProto(instanceName.getProjectId(), instanceName.getInstanceId()); return ApiFutureUtil.transformAndAdapt( delegate.modifyColumnFamilyAsync(modifyColumnRequestProto), 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> modifyFamiliesAsync(ModifyColumnFamiliesRequest request) { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest modifyColumnRequestProto = request.toProto(instanceName.getProjectId(), instanceName.getInstanceId()); return ApiFutureUtil.transformAndAdapt( delegate.modifyColumnFamilyAsync(modifyColumnRequestProto), 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> modifyFamiliesAsync(ModifyColumnFamiliesRequest request) { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest modifyColumnRequestProto = request.toProto(instanceName.getProjectId(), instanceName.getInstanceId()); return ApiFutureUtil.transformAndAdapt( delegate.modifyColumnFamilyAsync(modifyColumnRequestProto), 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> modifyFamiliesAsync(ModifyColumnFamiliesRequest request) { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest modifyColumnRequestProto = request.toProto(instanceName.getProjectId(), instanceName.getInstanceId()); return ApiFutureUtil.transformAndAdapt( delegate.modifyColumnFamilyAsync(modifyColumnRequestProto), 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> modifyFamiliesAsync(ModifyColumnFamiliesRequest request) { com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest modifyColumnRequestProto = request.toProto(instanceName.getProjectId(), instanceName.getInstanceId()); return ApiFutureUtil.transformAndAdapt( delegate.modifyColumnFamilyAsync(modifyColumnRequestProto), 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();  }