Skip to content

Commit 1648b12

Browse files
committed
Clarify doc
1 parent 6927417 commit 1648b12

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

datastore/src/main/java/io/spine/server/storage/datastore/TransactionWrapper.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838

3939
/**
4040
* A Cloud Datastore transaction wrapper.
41-
*
42-
* @implNote The wrapper provides API for basic operations which can be done transactionally.
43-
* There is no mechanism for a bulk write, since the limits on a single transaction
44-
* {@code Commit} operation are lower than the limits on a single {@code Put} operation.
45-
* @see <a href="https://cloud.google.com/datastore/docs/concepts/limits">Transaction limits</a>
4641
*/
4742
public final class TransactionWrapper implements AutoCloseable {
4843

@@ -96,7 +91,13 @@ public void createOrUpdate(Entity entity) throws DatastoreException {
9691
}
9792

9893
/**
99-
* Puts the given entity into the Datastore in the transaction.
94+
* Puts the given entities into the Datastore in the transaction.
95+
*
96+
* @implNote Unlike {@link DatastoreWrapper}, {@code TransactionWrapper} does not provide
97+
* a mechanism for writing large numbers of entities. Only 500 entities can be written
98+
* in a single transaction. Please see
99+
* the <a href="https://cloud.google.com/datastore/docs/concepts/limits">transaction
100+
* limits</a> for more info.
100101
*/
101102
public void createOrUpdate(Collection<Entity> entities) throws DatastoreException {
102103
Entity[] array = new Entity[entities.size()];

0 commit comments

Comments
 (0)