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 givenEntity
.
-
-
Constructor Summary
Constructors Constructor and Description LocalDatastoreCostAnalysis(com.google.appengine.api.datastore.dev.LocalCompositeIndexManager indexManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description 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 writingnewEntity
, assuming its current state in the datastore matchesoldEntity
.
-
-
-
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 writingnewEntity
, assuming its current state in the datastore matchesoldEntity
.- Parameters:
oldEntity
- Entity representing the current state in the datastore. Can benull
.newEntity
- Entity representing the desired state in the datastore.- Returns:
- The cost of writing
newEntity
.
-
-