App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine.ext.mapreduce.context._MutationPool Class Reference
Inheritance diagram for google.appengine.ext.mapreduce.context._MutationPool:
google.appengine.ext.mapreduce.context.Pool

Public Member Functions

def __init__
 
def put
 
def ndb_put
 
def delete
 
def ndb_delete
 
def flush
 
- Public Member Functions inherited from google.appengine.ext.mapreduce.context.Pool
def flush
 

Public Attributes

 max_entity_count
 
 force_writes
 
 puts
 
 deletes
 
 ndb_puts
 
 ndb_deletes
 

Detailed Description

Mutation pool accumulates datastore changes to perform them in batch.

Properties:
  puts: _ItemList of entities to put to datastore.
  deletes: _ItemList of keys to delete from datastore.
  ndb_puts: _ItemList of ndb entities to put to datastore.
  ndb_deletes: _ItemList of ndb keys to delete from datastore.

Constructor & Destructor Documentation

def google.appengine.ext.mapreduce.context._MutationPool.__init__ (   self,
  max_entity_count = MAX_ENTITY_COUNT,
  mapreduce_spec = None 
)
Constructor.

Args:
  max_entity_count: maximum number of entities before flushing it to db.
  mapreduce_spec: An optional instance of MapperSpec.

Member Function Documentation

def google.appengine.ext.mapreduce.context._MutationPool.delete (   self,
  entity 
)
Registers entity to delete from datastore.

Args:
  entity: an entity, model instance, or key to delete.
def google.appengine.ext.mapreduce.context._MutationPool.flush (   self)
Flush(apply) all changed to datastore.
def google.appengine.ext.mapreduce.context._MutationPool.ndb_delete (   self,
  entity_or_key 
)
Like delete(), but for NDB entities/keys.
def google.appengine.ext.mapreduce.context._MutationPool.ndb_put (   self,
  entity 
)
Like put(), but for NDB entities.
def google.appengine.ext.mapreduce.context._MutationPool.put (   self,
  entity 
)
Registers entity to put to datastore.

Args:
  entity: an entity or model instance to put.

The documentation for this class was generated from the following file: