public abstract class BaseDatastoreBatchWriter extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
BaseDatastoreBatchWriter(String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
active()
Deprecated.
|
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()
Deprecated.
|
protected void |
deactivate() |
void |
delete(Key... keys)
A datastore delete operation.
|
protected abstract Datastore |
getDatastore() |
protected String |
getName() |
boolean |
isActive()
Returns
true if still active (write operations were not sent to the Datastore). |
protected DatastoreException |
newInvalidRequest(String msg,
Object... params) |
List<Entity> |
put(FullEntity<?>... entities)
A Datastore put (a.k.a upsert) operation.
|
Entity |
put(FullEntity<?> entity)
A Datastore put (a.k.a upsert) operation.
|
void |
putWithDeferredIdAllocation(FullEntity<?>... entities)
Datastore put operation.
|
protected Map<Key,FullEntity<Key>> |
toAdd() |
protected List<FullEntity<IncompleteKey>> |
toAddAutoId() |
protected Set<Key> |
toDelete() |
protected List<com.google.datastore.v1.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.FullEntity<?>...).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.FullEntity<?>...) operation for entities that were already
added or put in this writer.public final Entity put(FullEntity<?> entity)
DatastoreWriterentity - the entity to putEntity with the same properties and a key that is either newly allocated
or the same one if key is already completepublic final void putWithDeferredIdAllocation(FullEntity<?>... entities)
put(FullEntity[]), this method will defer any necessary id
allocation to submit time.public final List<Entity> put(FullEntity<?>... entities)
Entity, ordered by input. Returned keys are
either newly allocated or the same one if was already complete.public final void delete(Key... keys)
@Deprecated public boolean active()
true if still active (write operations were not sent to the Datastore).public boolean isActive()
true if still active (write operations were not sent to the Datastore).protected String getName()
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.v1.Mutation> toMutationPbList()
@Deprecated protected abstract Datastore datastore()
protected abstract Datastore getDatastore()
Copyright © 2016 Google. All rights reserved.