use of com.google.cloud.Restorable in project google-cloud-java by GoogleCloudPlatform.
the class SerializationTest method restorableObjects.
@Override
protected Restorable<?>[] restorableObjects() {
StorageOptions options = StorageOptions.newBuilder().setProjectId("p2").build();
ReadChannel reader = new BlobReadChannel(options, BlobId.of("b", "n"), EMPTY_RPC_OPTIONS);
// avoid closing when you don't want partial writes to GCS upon failure
@SuppressWarnings("resource") BlobWriteChannel writer = new BlobWriteChannel(options, BlobInfo.newBuilder(BlobId.of("b", "n")).build(), "upload-id");
return new Restorable<?>[] { reader, writer };
}
Aggregations