Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.api.datastore.dev
Class LocalDatastoreCostAnalysis

    java.lang.Object
      com.google.appengine.api.datastore.dev.LocalDatastoreCostAnalysis

    public class LocalDatastoreCostAnalysis

extends java.lang.Object

Utility class that can calculate the cost of writing (put or delete) a given `Entity`.

Constructor Summary
`LocalDatastoreCostAnalysis(com.google.appengine.api.datastore.dev.LocalCompositeIndexManager indexManager)`

Method Summary
`CreationCostAnalysis` | `getCreationCostAnalysis(EntityProto e)`
`Cost` | `getWriteCost(EntityProto newEntity)` Determines the cost of writing this entity, assuming no previous value exists.
`Cost` | `getWriteOps(EntityProto oldEntity, EntityProto newEntity)` Determines the cost of writing `newEntity`, assuming its current state in the datastore matches `oldEntity`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LocalDatastoreCostAnalysis

    public LocalDatastoreCostAnalysis(com.google.appengine.api.datastore.dev.LocalCompositeIndexManager indexManager)

Method Detail

### getCreationCostAnalysis

    public CreationCostAnalysis getCreationCostAnalysis(EntityProto e)

### getWriteCost

    public Cost getWriteCost(EntityProto newEntity)

  Determines the cost of writing this entity, assuming no previous value exists.

  Parameters:
    `newEntity` - The entity whose write cost we are determining.
  Returns:
    The cost of writing the given entity.

### getWriteOps

    public Cost getWriteOps(EntityProto oldEntity,
                            EntityProto newEntity)

  Determines the cost of writing `newEntity`, assuming its current state in the datastore matches `oldEntity`.

  Parameters:
    `oldEntity` - Entity representing the current state in the datastore. Can be `null`.
    `newEntity` - Entity representing the desired state in the datastore.
  Returns:
    The cost of writing `newEntity`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD