Package com.azure.data.cosmos
Class ChangeFeedOptions
- java.lang.Object
-
- com.azure.data.cosmos.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 Summary
Constructors Constructor Description ChangeFeedOptions()
ChangeFeedOptions(ChangeFeedOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
maxItemCount()
Gets the maximum number of items to be returned in the enumeration operation.ChangeFeedOptions
maxItemCount(Integer maxItemCount)
Sets the maximum number of items to be returned in the enumeration operation.PartitionKey
partitionKey()
Gets the partition key used to identify the current request's target partition.ChangeFeedOptions
partitionKey(PartitionKey partitionkey)
Sets the partition key used to identify the current request's target partition.Map<String,Object>
properties()
Gets the propertiesChangeFeedOptions
properties(Map<String,Object> properties)
Sets the properties used to identify the request token.String
requestContinuation()
Gets the request continuation token.ChangeFeedOptions
requestContinuation(String requestContinuation)
Sets the request continuation token.OffsetDateTime
startDateTime()
Gets the zoned date time to start looking for changes after.ChangeFeedOptions
startDateTime(OffsetDateTime startDateTime)
Sets the zoned date time (exclusive) to start looking for changes after.boolean
startFromBeginning()
Get whether change feed should start from beginning (true) or from current (false).ChangeFeedOptions
startFromBeginning(boolean startFromBeginning)
Set whether change feed should start from beginning (true) or from current (false).
-
-
-
Constructor Detail
-
ChangeFeedOptions
public ChangeFeedOptions()
-
ChangeFeedOptions
public ChangeFeedOptions(ChangeFeedOptions options)
-
-
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.
-
-