Class CosmosDataAccessor


  • public class CosmosDataAccessor
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long deprecateContainers​(java.util.Set<ContainerDeletionEntry> deprecatedContainers)
      Add the ContainerDeletionEntry for newly deprecated Containers to cosmos table.
      java.util.Set<ContainerDeletionEntry> getDeprecatedContainers​(int maxEntries)  
      java.lang.String queryChangeFeed​(java.lang.String requestContinuationToken, int maxFeedSize, java.util.List<CloudBlobMetadata> changeFeed, java.lang.String partitionPath, com.codahale.metrics.Timer timer)
      Query Cosmos change feed to get the next set of CloudBlobMetadata objects in specified partitionPath after requestContinationToken, capped by specified maxFeedSize representing the max number of items to be queried from the change feed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COSMOS_LAST_UPDATED_COLUMN

        public static final java.lang.String COSMOS_LAST_UPDATED_COLUMN
        See Also:
        Constant Field Values
    • Method Detail

      • queryChangeFeed

        public java.lang.String queryChangeFeed​(java.lang.String requestContinuationToken,
                                                int maxFeedSize,
                                                java.util.List<CloudBlobMetadata> changeFeed,
                                                java.lang.String partitionPath,
                                                com.codahale.metrics.Timer timer)
                                         throws com.microsoft.azure.cosmosdb.DocumentClientException
        Query Cosmos change feed to get the next set of CloudBlobMetadata objects in specified partitionPath after requestContinationToken, capped by specified maxFeedSize representing the max number of items to be queried from the change feed.
        Parameters:
        requestContinuationToken - Continuation token after which change feed is requested.
        maxFeedSize - max item count to be requested in the feed query.
        changeFeed - CloudBlobMetadata List to be populated with the next set of entries returned by change feed query.
        partitionPath - partition for which the change feed is requested.
        timer - the Timer to use to record query time (excluding waiting).
        Returns:
        next continuation token.
        Throws:
        com.microsoft.azure.cosmosdb.DocumentClientException
      • deprecateContainers

        public long deprecateContainers​(java.util.Set<ContainerDeletionEntry> deprecatedContainers)
                                 throws com.microsoft.azure.cosmosdb.DocumentClientException
        Add the ContainerDeletionEntry for newly deprecated Containers to cosmos table.
        Parameters:
        deprecatedContainers - Set of deleted ContainerDeletionEntrys.
        Returns:
        the max deletion trigger time of all the added containers to serve as checkpoint for future update.
        Throws:
        com.microsoft.azure.cosmosdb.DocumentClientException