Class ChangeFeedOptions


  • public final class ChangeFeedOptions
    extends Object
    Specifies the options associated with change feed methods (enumeration operations) in the Azure Cosmos DB database service.
    • Constructor Detail

      • ChangeFeedOptions

        public ChangeFeedOptions()
    • Method Detail

      • startFromBeginning

        public boolean startFromBeginning()
        Get whether change feed should start from beginning (true) or from current (false). By default it's start from current (false).
        Returns:
        a boolean value indicating change feed should start from beginning or not
      • startFromBeginning

        public ChangeFeedOptions startFromBeginning​(boolean startFromBeginning)
        Set whether change feed should start from beginning (true) or from current (false). By default it's start from current (false).
        Parameters:
        startFromBeginning - a boolean value indicating change feed should start from beginning or not
        Returns:
        the ChangeFeedOptions.
      • startDateTime

        public OffsetDateTime startDateTime()
        Gets the zoned date time to start looking for changes after.
        Returns:
        a zoned date time to start looking for changes after, if set or null otherwise
      • startDateTime

        public ChangeFeedOptions startDateTime​(OffsetDateTime startDateTime)
        Sets the zoned date time (exclusive) to start looking for changes after. If this is specified, startFromBeginning is ignored.
        Parameters:
        startDateTime - a zoned date time to start looking for changes after.
        Returns:
        the ChangeFeedOptions.
      • maxItemCount

        public Integer maxItemCount()
        Gets the maximum number of items to be returned in the enumeration operation.
        Returns:
        the max number of items.
      • maxItemCount

        public ChangeFeedOptions maxItemCount​(Integer maxItemCount)
        Sets the maximum number of items to be returned in the enumeration operation.
        Parameters:
        maxItemCount - the max number of items.
        Returns:
        the FeedOptionsBase.
      • requestContinuation

        public String requestContinuation()
        Gets the request continuation token.
        Returns:
        the request continuation.
      • requestContinuation

        public ChangeFeedOptions requestContinuation​(String requestContinuation)
        Sets the request continuation token.
        Parameters:
        requestContinuation - the request continuation.
        Returns:
        the FeedOptionsBase.
      • partitionKey

        public PartitionKey partitionKey()
        Gets the partition key used to identify the current request's target partition.
        Returns:
        the partition key.
      • partitionKey

        public ChangeFeedOptions partitionKey​(PartitionKey partitionkey)
        Sets the partition key used to identify the current request's target partition.
        Parameters:
        partitionkey - the partition key value.
        Returns:
        the FeedOptionsBase.
      • properties

        public Map<String,​Object> properties()
        Gets the properties
        Returns:
        Map of request options properties
      • properties

        public ChangeFeedOptions properties​(Map<String,​Object> properties)
        Sets the properties used to identify the request token.
        Parameters:
        properties - the properties.
        Returns:
        the FeedOptionsBase.