@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * Permanently deletes the specified snapshot. * * <p>Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not * currently available to most Cloud Bigtable customers. This feature might be changed in * backward-incompatible ways and is not recommended for production use. It is not subject to any * SLA or deprecation policy. * * <p>Sample code: * * <pre><code> * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) { * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"); * baseBigtableTableAdminClient.deleteSnapshot(name.toString()); * } * </code></pre> * * @param name The unique name of the snapshot to be deleted. Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(String name) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setName(name).build(); deleteSnapshot(request); }
/** * Permanently deletes the specified snapshot. * * <p>Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not * currently available to most Cloud Bigtable customers. This feature might be changed in * backward-incompatible ways and is not recommended for production use. It is not subject to any * SLA or deprecation policy. * * <p>Sample code: * * <pre><code> * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) { * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"); * baseBigtableTableAdminClient.deleteSnapshot(name); * } * </code></pre> * * @param name The unique name of the snapshot to be deleted. Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(SnapshotName name) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteSnapshot(request); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@Override public CompletableFuture<Void> deleteSnapshot(String snapshotName) { return CompletableFuture.supplyAsync(() -> { try { return DeleteSnapshotRequest.newBuilder() .setName(getClusterName().toSnapshotName(snapshotName)) .build(); } catch (IOException e) { throw new CompletionException(e); } }).thenCompose( d -> bigtableTableAdminClient.deleteSnapshotAsync(d).thenApply(r -> null)); }
@Override public CompletableFuture<Void> deleteSnapshot(String snapshotName) { return CompletableFuture.supplyAsync(() -> { try { return DeleteSnapshotRequest.newBuilder() .setName(getClusterName().toSnapshotName(snapshotName)) .build(); } catch (IOException e) { throw new CompletionException(e); } }).thenCompose( d -> bigtableTableAdminClient.deleteSnapshotAsync(d).thenApply(r -> null)); }
/** * Permanently deletes the specified snapshot. * * <p>Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not * currently available to most Cloud Bigtable customers. This feature might be changed in * backward-incompatible ways and is not recommended for production use. It is not subject to any * SLA or deprecation policy. * * <p>Sample code: * * <pre><code> * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) { * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"); * baseBigtableTableAdminClient.deleteSnapshot(name.toString()); * } * </code></pre> * * @param name The unique name of the snapshot to be deleted. Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(String name) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setName(name).build(); deleteSnapshot(request); }
/** * Permanently deletes the specified snapshot. * * <p>Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not * currently available to most Cloud Bigtable customers. This feature might be changed in * backward-incompatible ways and is not recommended for production use. It is not subject to any * SLA or deprecation policy. * * <p>Sample code: * * <pre><code> * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) { * SnapshotName name = SnapshotName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[SNAPSHOT]"); * baseBigtableTableAdminClient.deleteSnapshot(name); * } * </code></pre> * * @param name The unique name of the snapshot to be deleted. Values are of the form * `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteSnapshot(SnapshotName name) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setName(name == null ? null : name.toString()).build(); deleteSnapshot(request); }
/** {@inheritDoc} */ @Override public void deleteSnapshot(String snapshotName) throws IOException { String btSnapshotName = getClusterName().toSnapshotName(snapshotName); DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder() .setName(btSnapshotName) .build(); Futures.getUnchecked(bigtableTableAdminClient.deleteSnapshotAsync(request)); }
/** {@inheritDoc} */ @Override public void deleteSnapshot(String snapshotName) throws IOException { String btSnapshotName = getClusterName().toSnapshotName(snapshotName); DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder() .setName(btSnapshotName) .build(); Futures.getUnchecked(bigtableTableAdminClient.deleteSnapshotAsync(request)); }