public static enum DatastoreService.KeyRangeState extends java.lang.Enum<DatastoreService.KeyRangeState>
KeyRange
.
Enum Constant and Description |
---|
COLLISION
Indicates that entities with keys inside the given
KeyRange
already exist and writing to this range will overwrite those entities.
|
CONTENTION
Indicates the given
KeyRange
is empty but the datastore's
automatic ID allocator may assign new entities keys in this range.
|
EMPTY
Indicates the given
KeyRange
is empty and the datastore's
automatic ID allocator will not assign keys in this range to new
entities.
|
Modifier and Type | Method and Description |
---|---|
static
DatastoreService.KeyRangeState
|
valueOf
(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static
DatastoreService.KeyRangeState
[]
|
values
()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DatastoreService.KeyRangeState EMPTY
KeyRange
is empty and the datastore's
automatic ID allocator will not assign keys in this range to new
entities.
public static final DatastoreService.KeyRangeState CONTENTION
KeyRange
is empty but the datastore's
automatic ID allocator may assign new entities keys in this range.
However it is safe to manually assign
Keys
in this range
if either of the following is true:
KeyRange
until all entities with manually assigned
keys from this range have been written.
KeyRange
is acceptable.
The datastore's automatic ID allocator will not assign a key to a new entity that will overwrite an existing entity, so once the range is populated there will no longer be any contention.
public static final DatastoreService.KeyRangeState COLLISION
KeyRange
already exist and writing to this range will overwrite those entities.
Additionally the implications of
CONTENTION
apply. If
overwriting entities that exist in this range is acceptable it is safe
to use the given range.
The datastore's automatic ID allocator will never assign a key to a new entity that will overwrite an existing entity so entities written by the user to this range will never be overwritten by an entity with an automatically assigned key.
public static DatastoreService.KeyRangeState[] values()
for (DatastoreService.KeyRangeState c : DatastoreService.KeyRangeState.values()) System.out.println(c);
public static DatastoreService.KeyRangeState valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is null