RawGcsService (App Engine Client for Google Cloud Storage 0.6 API)


Interface RawGcsService

  • public interface RawGcsService
    Low-level ("raw") interface to Google Cloud Storage. This interface need not be used or seen by users of Google Cloud Storage. Instead the higher level API GcsService should be used.

    Methods throw IOException for connection errors etc. that are retryable, and other exceptions for bad requests and similar errors that should not be retried.

    Implementing classes handle authentication through mechanisms not exposed in this interface.

    • Method Detail

      • getMaxWriteSizeByte

        int getMaxWriteSizeByte()
        Returns the max bytes allowed per putObject/finishObject operations. Value should always be equal or larger than getChunkSizeBytes().
      • continueObjectCreationAsync

        Future<RawGcsService.RawGcsCreationToken> continueObjectCreationAsync(RawGcsService.RawGcsCreationToken token,
                                                                              ByteBuffer chunk,
                                                                              long timeoutMillis)
        Reads all remaining bytes from chunk and writes them to the object and offset specified by token asynchronously.

        Returns a future for a new token to be used to continue writing to the object. Does not mutate token.

        The number of bytes remaining in chunk must be a nonzero multiple of getChunkSizeBytes() and may be subject to an upper limit that is implementation-dependent.

        The calling code is responsible for guaranteeing that the byte sequence written to the object remains identical across retries. (This is because the write may have succeeded on the backend even though an exception was thrown by this method, and writing different data on a retry leaves the object in a bad state.)