A stub to allow clients to do synchronous rpc calls to service Datastore.
Each RPC normalizes the partition IDs of the keys in its input entities,
and always returns entities with keys with normalized partition IDs.
This applies to all keys and entities, including those in values, except keys
with both an empty path and an empty or unset partition ID. Normalization of
input keys sets the project ID (if not already set) to the project ID from
the request.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Class DatastoreGrpc.DatastoreBlockingV2Stub (2.31.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.31.2 (latest)](/java/docs/reference/google-cloud-datastore/latest/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.31.1](/java/docs/reference/google-cloud-datastore/2.31.1/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.30.0](/java/docs/reference/google-cloud-datastore/2.30.0/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.29.1](/java/docs/reference/google-cloud-datastore/2.29.1/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.28.2](/java/docs/reference/google-cloud-datastore/2.28.2/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.27.1](/java/docs/reference/google-cloud-datastore/2.27.1/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.26.4](/java/docs/reference/google-cloud-datastore/2.26.4/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.25.2](/java/docs/reference/google-cloud-datastore/2.25.2/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.24.3](/java/docs/reference/google-cloud-datastore/2.24.3/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.23.0](/java/docs/reference/google-cloud-datastore/2.23.0/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.22.0](/java/docs/reference/google-cloud-datastore/2.22.0/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.21.3](/java/docs/reference/google-cloud-datastore/2.21.3/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.20.2](/java/docs/reference/google-cloud-datastore/2.20.2/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.19.2](/java/docs/reference/google-cloud-datastore/2.19.2/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.18.5](/java/docs/reference/google-cloud-datastore/2.18.5/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub)\n- [2.17.6](/java/docs/reference/google-cloud-datastore/2.17.6/com.google.datastore.v1.DatastoreGrpc.DatastoreBlockingV2Stub) \n\n public static final class DatastoreGrpc.DatastoreBlockingV2Stub extends AbstractBlockingStub\u003cDatastoreGrpc.DatastoreBlockingV2Stub\u003e\n\nA stub to allow clients to do synchronous rpc calls to service Datastore.\n\nEach RPC normalizes the partition IDs of the keys in its input entities,\nand always returns entities with keys with normalized partition IDs.\nThis applies to all keys and entities, including those in values, except keys\nwith both an empty path and an empty or unset partition ID. Normalization of\ninput keys sets the project ID (if not already set) to the project ID from\nthe request. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e io.grpc.stub.AbstractStub \\\u003e io.grpc.stub.AbstractBlockingStub \\\u003e DatastoreGrpc.DatastoreBlockingV2Stub \n\nInherited Members\n-----------------\n\nio.grpc.stub.AbstractBlockingStub.\\\u003cT\\\u003enewStub(io.grpc.stub.AbstractStub.StubFactory\\\u003cT\\\u003e,io.grpc.Channel) \nio.grpc.stub.AbstractBlockingStub.\\\u003cT\\\u003enewStub(io.grpc.stub.AbstractStub.StubFactory\\\u003cT\\\u003e,io.grpc.Channel,io.grpc.CallOptions) \nio.grpc.stub.AbstractStub.\\\u003cT\\\u003ewithOption(io.grpc.CallOptions.Key\\\u003cT\\\u003e,T) \nio.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions) \nio.grpc.stub.AbstractStub.getCallOptions() \nio.grpc.stub.AbstractStub.getChannel() \nio.grpc.stub.AbstractStub.withCallCredentials(io.grpc.CallCredentials) \nio.grpc.stub.AbstractStub.withChannel(io.grpc.Channel) \nio.grpc.stub.AbstractStub.withCompression(java.lang.String) \nio.grpc.stub.AbstractStub.withDeadline(io.grpc.Deadline) \nio.grpc.stub.AbstractStub.withDeadlineAfter(java.time.Duration) \nio.grpc.stub.AbstractStub.withDeadlineAfter(long,java.util.concurrent.TimeUnit) \nio.grpc.stub.AbstractStub.withExecutor(java.util.concurrent.Executor) \nio.grpc.stub.AbstractStub.withInterceptors(io.grpc.ClientInterceptor...) \nio.grpc.stub.AbstractStub.withMaxInboundMessageSize(int) \nio.grpc.stub.AbstractStub.withMaxOutboundMessageSize(int) \nio.grpc.stub.AbstractStub.withOnReadyThreshold(int) \nio.grpc.stub.AbstractStub.withWaitForReady() \n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nMethods\n-------\n\n### allocateIds(AllocateIdsRequest request)\n\n public AllocateIdsResponse allocateIds(AllocateIdsRequest request)\n\nAllocates IDs for the given keys, which is useful for referencing an entity\nbefore it is inserted.\n\n### beginTransaction(BeginTransactionRequest request)\n\n public BeginTransactionResponse beginTransaction(BeginTransactionRequest request)\n\nBegins a new transaction.\n\n### build(Channel channel, CallOptions callOptions)\n\n protected DatastoreGrpc.DatastoreBlockingV2Stub build(Channel channel, CallOptions callOptions)\n\n**Overrides** \nio.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)\n\n### commit(CommitRequest request)\n\n public CommitResponse commit(CommitRequest request)\n\nCommits a transaction, optionally creating, deleting or modifying some\nentities.\n\n### lookup(LookupRequest request)\n\n public LookupResponse lookup(LookupRequest request)\n\nLooks up entities by key.\n\n### reserveIds(ReserveIdsRequest request)\n\n public ReserveIdsResponse reserveIds(ReserveIdsRequest request)\n\nPrevents the supplied keys' IDs from being auto-allocated by Cloud\nDatastore.\n\n### rollback(RollbackRequest request)\n\n public RollbackResponse rollback(RollbackRequest request)\n\nRolls back a transaction.\n\n### runAggregationQuery(RunAggregationQueryRequest request)\n\n public RunAggregationQueryResponse runAggregationQuery(RunAggregationQueryRequest request)\n\nRuns an aggregation query.\n\n### runQuery(RunQueryRequest request)\n\n public RunQueryResponse runQuery(RunQueryRequest request)\n\nQueries for entities."]]