Send feedback
Interface AsyncDatastoreService (2.0.0)
Stay organized with collections
Save and categorize content based on your preferences.
public interface AsyncDatastoreService extends BaseDatastoreService
An asynchronous version of DatastoreService . All methods return immediately and provide
Futures as their return values.
The key difference between implementations of AsyncDatastoreService and
implementations of DatastoreService is that async implementations do not perform implicit
transaction management. The reason is that implicit transaction management requires automatic
commits of some transactions, and without some sort of callback mechanism there is no way to
determine that a put/get/delete that has been implicitly enrolled in a transaction is complete
and therefore ready to be committed. See ImplicitTransactionManagementPolicy for more
information.
Methods
allocateIds(@Nullable Key parent, String kind, long num)
public abstract Future<KeyRange> allocateIds ( @Nullable Key parent , String kind , long num )
Parameters
Name
Description
parent
@org.checkerframework.checker.nullness.qual.Nullable com.google.appengine.api.datastore.Key
kind
String
num
long
allocateIds(String kind, long num)
public abstract Future<KeyRange> allocateIds ( String kind , long num )
beginTransaction()
public abstract Future<Transaction> beginTransaction ()
beginTransaction(TransactionOptions options)
public abstract Future<Transaction> beginTransaction ( TransactionOptions options )
delete(@Nullable Transaction txn, Key[] keys)
public abstract Future<Void> delete ( @Nullable Transaction txn , Key [] keys )
Parameters
Name
Description
txn
@org.checkerframework.checker.nullness.qual.Nullable com.google.appengine.api.datastore.Transaction
keys
Key []
delete(@Nullable Transaction txn, Iterable<Key> keys)
public abstract Future<Void> delete ( @Nullable Transaction txn , Iterable<Key> keys )
Parameters
Name
Description
txn
@org.checkerframework.checker.nullness.qual.Nullable com.google.appengine.api.datastore.Transaction
keys
Iterable <Key >
delete(Key[] keys)
public abstract Future<Void> delete ( Key [] keys )
Parameter
Name
Description
keys
Key []
delete(Iterable<Key> keys)
public abstract Future<Void> delete ( Iterable<Key> keys )
get(@Nullable Transaction txn, Key key)
public abstract Future<Entity> get ( @Nullable Transaction txn , Key key )
Parameters
Name
Description
txn
@org.checkerframework.checker.nullness.qual.Nullable com.google.appengine.api.datastore.Transaction
key
Key
get(@Nullable Transaction txn, Iterable<Key> keys)
public abstract Future<Map<Key , Entity >> get ( @Nullable Transaction txn , Iterable<Key> keys )
Parameters
Name
Description
txn
@org.checkerframework.checker.nullness.qual.Nullable com.google.appengine.api.datastore.Transaction
keys
Iterable <Key >
get(Key key)
public abstract Future<Entity> get ( Key key )
Parameter
Name
Description
key
Key
get(Iterable<Key> keys)
public abstract Future<Map<Key , Entity >> get ( Iterable<Key> keys )
getDatastoreAttributes()
public abstract Future<DatastoreAttributes> getDatastoreAttributes ()
getIndexes()
public abstract Future<Map<Index , Index . IndexState >> getIndexes ()
put(@Nullable Transaction txn, Entity entity)
public abstract Future<Key> put ( @Nullable Transaction txn , Entity entity )
Parameters
Name
Description
txn
@org.checkerframework.checker.nullness.qual.Nullable com.google.appengine.api.datastore.Transaction
entity
Entity
put(@Nullable Transaction txn, Iterable<Entity> entities)
public abstract Future<List<Key> > put ( @Nullable Transaction txn , Iterable<Entity> entities )
Parameters
Name
Description
txn
@org.checkerframework.checker.nullness.qual.Nullable com.google.appengine.api.datastore.Transaction
entities
Iterable <Entity >
put(Entity entity)
public abstract Future<Key> put ( Entity entity )
Parameter
Name
Description
entity
Entity
put(Iterable<Entity> entities)
public abstract Future<List<Key> > put ( Iterable<Entity> entities )
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-19 UTC.
Need to tell us more?
[[["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 2024-12-19 UTC."],[],[]]