public abstract class BaseDatastoreBatchWriter extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
BaseDatastoreBatchWriter(String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
active()
Returns
true if still active (write operations were not sent to the Datastore). |
List<Entity> |
add(FullEntity<?>... entities)
Datastore add operation.
|
Entity |
add(FullEntity<?> entity)
Datastore add operation.
|
void |
addWithDeferredIdAllocation(FullEntity<?>... entities)
Datastore add operation.
|
protected abstract Datastore |
datastore() |
protected void |
deactivate() |
void |
delete(Key... keys)
A datastore delete operation.
|
protected String |
name() |
protected DatastoreException |
newInvalidRequest(String msg,
Object... params) |
void |
put(Entity... entities)
A Datastore put (a.k.a upsert) operation.
|
protected Map<Key,FullEntity<Key>> |
toAdd() |
protected List<FullEntity<IncompleteKey>> |
toAddAutoId() |
protected Set<Key> |
toDelete() |
protected List<com.google.datastore.v1beta3.Mutation> |
toMutationPbList() |
protected Map<Key,FullEntity<Key>> |
toPut() |
protected Map<Key,FullEntity<Key>> |
toUpdate() |
void |
update(Entity... entities)
A Datastore update operation.
|
protected void |
validateActive() |
protected BaseDatastoreBatchWriter(String name)
public final void addWithDeferredIdAllocation(FullEntity<?>... entities)
DatastoreWriter.add(FullEntity), this method will defer any necessary id allocation
to submit time.public final Entity add(FullEntity<?> entity)
DatastoreWriterentity - the entity to addEntity with the same properties and a key that is either newly allocated
or the same one if key is already completepublic final List<Entity> add(FullEntity<?>... entities)
put(com.google.cloud.datastore.Entity...).Entity ordered by input with the same properties and a key that
is either newly allocated or the same one if was already completeDatastoreWriter.add(FullEntity)@SafeVarargs public final void update(Entity... entities)
put(com.google.cloud.datastore.Entity...) operation for entities that were already
added or put in this writer@SafeVarargs public final void put(Entity... entities)
public final void delete(Key... keys)
public boolean active()
true if still active (write operations were not sent to the Datastore).protected String name()
protected Map<Key,FullEntity<Key>> toAdd()
protected List<FullEntity<IncompleteKey>> toAddAutoId()
protected Map<Key,FullEntity<Key>> toUpdate()
protected Map<Key,FullEntity<Key>> toPut()
protected void deactivate()
protected void validateActive()
protected DatastoreException newInvalidRequest(String msg, Object... params)
protected List<com.google.datastore.v1beta3.Mutation> toMutationPbList()
protected abstract Datastore datastore()
Copyright © 2016 Google. All rights reserved.