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
Class DatastoreServiceConfig

    java.lang.Object
      com.google.appengine.api.datastore.DatastoreServiceConfig

    public final class DatastoreServiceConfig

extends java.lang.Object

User-configurable properties of the datastore. Notes on usage:
The recommended way to instantiate a `DatastoreServiceConfig` object is to statically import `DatastoreServiceConfig.Builder`.* and invoke a static creation method followed by an instance mutator (if needed):

>      import static com.google.appengine.api.datastore.DatastoreServiceConfig.Builder.*;
>      import com.google.appengine.api.datastore.ReadPolicy.Consistency;

>      ...

>      // eventually consistent reads
>      DatastoreServiceConfig config = withReadPolicy(new ReadPolicy(Consistency.EVENTUAL));

>      // eventually consistent reads with a 5 second deadline
>      DatastoreServiceConfig config =
>        withReadPolicy(new ReadPolicy(Consistency.EVENTUAL)).deadline(5.0);

Nested Class Summary
`static class` | `DatastoreServiceConfig.Builder` Contains static creation methods for `DatastoreServiceConfig`.

Method Summary
`DatastoreServiceConfig` | `deadline(double deadline)` Sets the deadline, in seconds, for all rpcs initiated by the `DatastoreService` with which this config is associated.
`java.lang.Double` | `getDeadline()`
`ImplicitTransactionManagementPolicy` | `getImplicitTransactionManagementPolicy()`
`ReadPolicy` | `getReadPolicy()`
`DatastoreServiceConfig` | `implicitTransactionManagementPolicy(ImplicitTransactionManagementPolicy p)` Sets the implicit transaction management policy.
`DatastoreServiceConfig` | `readPolicy(ReadPolicy readPolicy)` Sets the read policy.

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

Method Detail

### implicitTransactionManagementPolicy

    public DatastoreServiceConfig implicitTransactionManagementPolicy(ImplicitTransactionManagementPolicy p)

  Sets the implicit transaction management policy.

  Parameters:
    `p` - the implicit transaction management policy to set.
  Returns:
    `this` (for chaining)

### readPolicy

    public DatastoreServiceConfig readPolicy(ReadPolicy readPolicy)

  Sets the read policy.

  Parameters:
    `readPolicy` - the read policy to set.
  Returns:
    `this` (for chaining)

### deadline

    public DatastoreServiceConfig deadline(double deadline)

  Sets the deadline, in seconds, for all rpcs initiated by the `DatastoreService` with which this config is associated.

  Parameters:
    `deadline` - the deadline to set.
  Returns:
    `this` (for chaining)
  Throws:
    `java.lang.IllegalArgumentException` - if deadline is not positive

### getImplicitTransactionManagementPolicy

    public ImplicitTransactionManagementPolicy getImplicitTransactionManagementPolicy()

  Returns:
    The `ImplicitTransactionManagementPolicy` to use.

### getReadPolicy

    public ReadPolicy getReadPolicy()

  Returns:
    The `ReadPolicy` to use.

### getDeadline

    public java.lang.Double getDeadline()

  Returns:
    The deadline to use. Can be `null`.

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