Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2013 Google Inc. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package com.google.api.services.datastore.client;
 
 import  com.google.api.client.http.HttpStatusCodes;
 
Provides access to the Datastore.
 
 public class Datastore {
 
   final RemoteRpc remoteRpc;
 
   Datastore(RemoteRpc remoteRpc) {
     this. = remoteRpc;
   }

  
Reset the RPC count.
 
   public void resetRpcCount() {
   }

  
Returns the number of RPC calls made since the client was created or resetRpcCount was called.
 
   public int getRpcCount() {
     return .getRpcCount();
   }
 
   private DatastoreException invalidResponseException(String methodIOException exception) {
     return RemoteRpc.makeException(.getUrl(), method,
         HttpStatusCodes.STATUS_CODE_SERVICE_UNAVAILABLE, "Invalid response"exception);
   }
 
     try {
       return AllocateIdsResponse.parseFrom(.call("allocateIds"request));
     } catch (IOException exception) {
       throw invalidResponseException("allocateIds"exception);
     }
   }
 
       throws DatastoreException {
     try {
       return BeginTransactionResponse.parseFrom(.call("beginTransaction"request));
     } catch (IOException exception) {
       throw invalidResponseException("beginTransaction"exception);
     }
   }
 
   public CommitResponse commit(CommitRequest requestthrows DatastoreException {
     try {
       return CommitResponse.parseFrom(.call("commit"request));
     } catch (IOException exception) {
       throw invalidResponseException("commit"exception);
     }
   }
 
   public LookupResponse lookup(LookupRequest requestthrows DatastoreException {
     try {
       return LookupResponse.parseFrom(.call("lookup"request));
     } catch (IOException exception) {
       throw invalidResponseException("lookup"exception);
     }
   }
    try {
      return RollbackResponse.parseFrom(.call("rollback"request));
    } catch (IOException exception) {
      throw invalidResponseException("rollback"exception);
    }
  }
    try {
      return RunQueryResponse.parseFrom(.call("runQuery"request));
    } catch (IOException exception) {
      throw invalidResponseException("runQuery"exception);
    }
  }
    try {
      return BlindWriteResponse.parseFrom(.call("blindWrite"request));
    } catch (IOException exception) {
      throw invalidResponseException("blindWrite"exception);
    }
  }
New to GrepCode? Check out our FAQ X