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)