|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.appengine.api.datastore.dev.LocalDatastoreService
@ServiceProvider(value=) public final class LocalDatastoreService
A local implementation of the Datastore service interface. This is a memory-based implementation which can persist itself to disk through a batch operation. TODO(tobyr) Improve this implementation such that it's backed by something like Derby (which is bundled with the JDK), perhaps in "iteration 2".
Field Summary | |
---|---|
static java.lang.String |
BACKING_STORE_PROPERTY
Where to read/store the datastore from/to. |
static java.lang.String |
HIGH_REP_JOB_POLICY_CLASS_PROPERTY
The fully-qualifed name of a class that implements HighRepJobPolicy and has a no-arg constructor. |
static java.lang.String |
MAX_QUERY_LIFETIME_PROPERTY
How long a query can stay "live" before we expire it. |
static java.lang.String |
MAX_TRANSACTION_LIFETIME_PROPERTY
How long a transaction can stay "live" before we expire it. |
static java.lang.String |
NO_INDEX_AUTO_GEN_PROP
True to prevent the datastore from writing com.google.apphosting.utils.config.IndexesXmlReader#GENERATED_INDEX_FILENAME . |
static java.lang.String |
NO_STORAGE_PROPERTY
True to put the datastore into "memory-only" mode. |
static java.lang.String |
PACKAGE
The package name for this service. |
static java.lang.String |
STORE_DELAY_PROPERTY
How long to wait before updating the persistent store in milliseconds. |
Constructor Summary | |
---|---|
LocalDatastoreService()
|
Method Summary | |
---|---|
VoidProto |
addActions(Status status,
TaskQueueBulkAddRequest request)
|
AllocateIdsResponse |
allocateIds(Status status,
AllocateIdsRequest req)
|
Transaction |
beginTransaction(Status status,
BeginTransactionRequest req)
|
void |
clearProfiles()
Clear out the in-memory datastore. |
CommitResponse |
commit(Status status,
Transaction req)
|
Integer64Proto |
count(Status status,
Query request)
|
Integer64Proto |
createIndex(Status status,
CompositeIndex req)
|
DeleteResponse |
delete(Status status,
DeleteRequest request)
|
VoidProto |
deleteCursor(Status status,
Cursor request)
|
DeleteResponse |
deleteImpl(Status status,
DeleteRequest request)
|
VoidProto |
deleteIndex(Status status,
CompositeIndex req)
|
GetResponse |
get(Status status,
GetRequest request)
|
CompositeIndices |
getIndices(Status status,
StringProto req)
|
java.lang.String |
getPackage()
|
Schema |
getSchema(Status status,
GetSchemaRequest req)
|
void |
init(LocalServiceContext context,
java.util.Map<java.lang.String,java.lang.String> properties)
|
QueryResult |
next(Status status,
NextRequest request)
|
PutResponse |
put(Status status,
PutRequest request)
|
PutResponse |
putImpl(Status status,
PutRequest request)
|
VoidProto |
rollback(Status status,
Transaction req)
|
QueryResult |
runQuery(Status status,
Query query)
|
void |
setBackingStore(java.lang.String backingStore)
|
void |
setMaxQueryLifetime(int milliseconds)
|
void |
setMaxTransactionLifetime(int milliseconds)
|
void |
setNoStorage(boolean noStorage)
|
void |
setStoreDelay(int delayMs)
|
void |
start()
|
void |
stop()
|
VoidProto |
updateIndex(Status status,
CompositeIndex req)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PACKAGE
public static final java.lang.String MAX_QUERY_LIFETIME_PROPERTY
public static final java.lang.String MAX_TRANSACTION_LIFETIME_PROPERTY
public static final java.lang.String STORE_DELAY_PROPERTY
public static final java.lang.String BACKING_STORE_PROPERTY
public static final java.lang.String NO_INDEX_AUTO_GEN_PROP
com.google.apphosting.utils.config.IndexesXmlReader#GENERATED_INDEX_FILENAME
.
public static final java.lang.String NO_STORAGE_PROPERTY
public static final java.lang.String HIGH_REP_JOB_POLICY_CLASS_PROPERTY
HighRepJobPolicy
and has a no-arg constructor. If not provided we
use a DefaultHighRepJobPolicy
. See the javadoc for this class for
information on its configurable properties.
Constructor Detail |
---|
public LocalDatastoreService()
Method Detail |
---|
public void clearProfiles()
public void init(LocalServiceContext context, java.util.Map<java.lang.String,java.lang.String> properties)
public void start()
public void stop()
public void setMaxQueryLifetime(int milliseconds)
public void setMaxTransactionLifetime(int milliseconds)
public void setBackingStore(java.lang.String backingStore)
public void setStoreDelay(int delayMs)
public void setNoStorage(boolean noStorage)
public java.lang.String getPackage()
public GetResponse get(Status status, GetRequest request)
public PutResponse put(Status status, PutRequest request)
public PutResponse putImpl(Status status, PutRequest request)
public DeleteResponse delete(Status status, DeleteRequest request)
public VoidProto addActions(Status status, TaskQueueBulkAddRequest request)
public DeleteResponse deleteImpl(Status status, DeleteRequest request)
public QueryResult runQuery(Status status, Query query)
public QueryResult next(Status status, NextRequest request)
public Integer64Proto count(Status status, Query request)
public VoidProto deleteCursor(Status status, Cursor request)
public Transaction beginTransaction(Status status, BeginTransactionRequest req)
public CommitResponse commit(Status status, Transaction req)
public VoidProto rollback(Status status, Transaction req)
public Schema getSchema(Status status, GetSchemaRequest req)
public Integer64Proto createIndex(Status status, CompositeIndex req)
public VoidProto updateIndex(Status status, CompositeIndex req)
public CompositeIndices getIndices(Status status, StringProto req)
public VoidProto deleteIndex(Status status, CompositeIndex req)
public AllocateIdsResponse allocateIds(Status status, AllocateIdsRequest req)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |