简体   繁体   中英

azure cosmos changefeed estimator in java

I'm trying to implement changefeed estimator in java. But having a hard time finding api for that. Wondering if anyone has a sample of it. Here is the link to the .net implementation of what I'm looking for https://docs.microsoft.com/bs-latn-ba/azure/cosmos-db/how-to-use-change-feed-estimator

There is the source code Azure/azure-cosmos-dotnet-v3/Microsoft.Azure.Cosmos.Samples/Usage/ChangeFeed/Program.cs of sample code of the offical docuemnt Use the change feed estimator .

And there is the sample code for ChangeFeedProcess in Java Azure/azure-cosmosdb-java/.../examples/ChangeFeed/SampleChangeFeedProcessor.java .

The difference is that there is not a function GetChangeFeedEstimatorBuilder of class Container in Azure Cosmos Java SDK, but it seems that the C# implementation for GetChangeFeedEstimatorBuilder also to generate a ChangeFeedProcess instance, so I think you can refer to the C# code to write your Java one.

Here is the related C# source code as references for you.

  1. https://github.com/Azure/azure-cosmos-dotnet-v3/blob/36444e8914f7224535e7b4ab819d748b66333aa1/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs#L388

  2. https://github.com/Azure/azure-cosmos-dotnet-v3/blob/36444e8914f7224535e7b4ab819d748b66333aa1/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs#L411

    在此处输入图片说明

  3. https://github.com/Azure/azure-cosmos-dotnet-v3/blob/6f610954032d913eef13727669d0b7e0f061116c/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimatorCore.cs

    在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM