Class CosmosUpdateTimeBasedReplicationFeed

  • All Implemented Interfaces:
    AzureReplicationFeed, java.io.Closeable, java.lang.AutoCloseable

    public class CosmosUpdateTimeBasedReplicationFeed
    extends java.lang.Object
    implements AzureReplicationFeed
    The replication feed that provides next list of blobs to replicate from Azure and corresponding FindToken using Cosmos update time field.
    • Method Detail

      • getNextEntriesAndUpdatedToken

        public FindResult getNextEntriesAndUpdatedToken​(com.github.ambry.replication.FindToken curfindToken,
                                                        long maxTotalSizeOfEntries,
                                                        java.lang.String partitionPath)
                                                 throws com.microsoft.azure.cosmosdb.DocumentClientException
        Description copied from interface: AzureReplicationFeed
        Returns an ordered sequenced list of blobs within the specified partition and updated FindToken, such that total size of all blobs in the list are less or equal to maxTotalSizeOfEntries. This method should return at least one blob, if exists, after curfindToken, irrespective of maxTotalSizeOfEntries requirement.
        Specified by:
        getNextEntriesAndUpdatedToken in interface AzureReplicationFeed
        Parameters:
        curfindToken - current FindToken object that acts as a bookmark to return blobs after.
        maxTotalSizeOfEntries - max total size of all the CloudBlobMetadata objects returned.
        partitionPath - partition of the blobs.
        Returns:
        FindResult instance that contains updated FindToken object which can act as a bookmark for subsequent requests, and List of CloudBlobMetadata entries.
        Throws:
        com.microsoft.azure.cosmosdb.DocumentClientException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable