You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support querying all locks with the same partition key.
The function signature can be similar to:
/**
* <p>
* Retrieves the locks with partition_key = {@code key}.
* </p>
* <p>
* Not that this may return a lock item even if it was released.
* </p>
*
* @param key the partition key
* @param deleteOnRelease Whether or not the {@link LockItem} should delete the item
* when {@link LockItem#close()} is called on it.
* @return A non parallel {@link Stream} of {@link LockItem}s that has the partition key in
* DynamoDB. Note that the item can exist in the table even if it is
* released, as noted by {@link LockItem#isReleased()}.
*/
public Stream<LockItem> getLocksByPartitionKey(String key, final boolean deleteOnRelease) {
Currently the only way to get multiple leases is by scanning the table ie - via getAllLocksFromDynamoDB(). This is useful in cases where we only want to query a subset of the leases. For example, leases can be categorized and each lease in the same category has the same partition key but different sort keys.
Loading all leases by partition key should require an efficient query instead of a full scan.
The text was updated successfully, but these errors were encountered:
Support querying all locks with the same partition key.
The function signature can be similar to:
Currently the only way to get multiple leases is by scanning the table ie - via
getAllLocksFromDynamoDB()
. This is useful in cases where we only want to query a subset of the leases. For example, leases can be categorized and each lease in the same category has the same partition key but different sort keys.Loading all leases by partition key should require an efficient query instead of a full scan.
The text was updated successfully, but these errors were encountered: