DatastoreMutationPool allows you to pool datastore operations such that they are applied in batches, requiring fewer datastore API calls. Mutations are accumulated until they reach a count limit on the number of unflushed mutations, until they reach a size limit on the byte count of unflushed mutations, or until a manual flush is requested. A typical use would be:
{@code}class Example extends Mapper<...> ... private transient DatastoreMutationPool pool; ... public void beginSlice() { pool = DatastoreMutationPool.create(); } public void endSlice() { pool.flush(); } public void map(... value) { ... Entity entity = ... pool.put(entity); ... } } }