forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transactional batch for Java (Azure#15775)
* Transactional batch seperate Signed-off-by: Rakesh Kumar <[email protected]> * Code review changes Signed-off-by: Rakesh Kumar <[email protected]> * Few more fixes Signed-off-by: Rakesh Kumar <[email protected]> * Fix Signed-off-by: Rakesh Kumar <[email protected]> * fix Signed-off-by: Rakesh Kumar <[email protected]> * Added issue link Signed-off-by: Rakesh Kumar <[email protected]> * beta version change Signed-off-by: Rakesh Kumar <[email protected]> * Add Beta change to public classes Signed-off-by: Rakesh Kumar <[email protected]> * Minor fix Signed-off-by: Rakesh Kumar <[email protected]> * Code review Signed-off-by: Rakesh Kumar <[email protected]> * Fix Signed-off-by: Rakesh Kumar <[email protected]> * Minor fix Signed-off-by: Rakesh Kumar <[email protected]> * Session token fix and test cases Signed-off-by: Rakesh Kumar <[email protected]> * code review changes Signed-off-by: Rakesh Kumar <[email protected]> * Removing one test case Signed-off-by: Rakesh Kumar <[email protected]> * test Signed-off-by: Rakesh Kumar <[email protected]> * Fix Signed-off-by: Rakesh Kumar <[email protected]> * API change Signed-off-by: Rakesh Kumar <[email protected]> * Adding CosmosItemoperation interface Signed-off-by: Rakesh Kumar <[email protected]> * Fixing comment Signed-off-by: Rakesh Kumar <[email protected]> * Fix Signed-off-by: Rakesh Kumar <[email protected]> * Reverting byte buffer change Signed-off-by: Rakesh Kumar <[email protected]>
- Loading branch information
Showing
37 changed files
with
3,268 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosItemOperation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.cosmos; | ||
|
||
import com.azure.cosmos.models.PartitionKey; | ||
import com.azure.cosmos.util.Beta; | ||
|
||
@Beta(Beta.SinceVersion.V4_7_0) | ||
public interface CosmosItemOperation { | ||
String getId(); | ||
|
||
PartitionKey getPartitionKeyValue(); | ||
|
||
CosmosItemOperationType getOperationType(); | ||
|
||
<T> T getItem(); | ||
} |
27 changes: 27 additions & 0 deletions
27
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosItemOperationType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.cosmos; | ||
|
||
import com.azure.cosmos.implementation.batch.BatchRequestResponseConstant; | ||
import com.azure.cosmos.util.Beta; | ||
|
||
@Beta(Beta.SinceVersion.V4_7_0) | ||
public enum CosmosItemOperationType { | ||
|
||
CREATE(BatchRequestResponseConstant.OPERATION_CREATE), | ||
DELETE(BatchRequestResponseConstant.OPERATION_DELETE), | ||
READ(BatchRequestResponseConstant.OPERATION_READ), | ||
REPLACE(BatchRequestResponseConstant.OPERATION_REPLACE), | ||
UPSERT(BatchRequestResponseConstant.OPERATION_UPSERT); | ||
|
||
CosmosItemOperationType(String operationValue) { | ||
this.operationValue = operationValue; | ||
} | ||
|
||
String getOperationValue() { | ||
return operationValue; | ||
} | ||
|
||
private final String operationValue; | ||
} |
Oops, something went wrong.