Represents a range of unique datastore identifiers from getStart().getId() to
getEnd().getId() inclusive. If an instance of this class is the result of a call to
DatastoreService.allocateIds(), the Keys returned by this instance have been
consumed in the datastore's id-space and are guaranteed never to be reused.
This class can be used to construct Entities with Keys that have
specific id values without fear of the datastore creating new records with those same ids at a
later date. This can be helpful as part of a data migration or large bulk upload where you may
need to preserve existing ids and relationships between entities.
This class is threadsafe but the Iterators returned by #iterator() are
not.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["`KeyRange` represents a range of unique datastore identifiers, from a start key to an end key, inclusive."],["`KeyRange` guarantees that the returned keys from the `DatastoreService.allocateIds()` method will not be reused in the datastore's ID space."],["This class is beneficial when you need to use specific ID values for `Entities`, ensuring that the datastore will not create new records with those same IDs."],["The `KeyRange` class is thread-safe, but the `Iterators` returned by its `iterator()` method are not thread-safe."],["The `KeyRange` class implements the `Iterable\u003cKey\u003e` and `Serializable` interfaces."]]],[]]