Package io.dapr.durabletask
Class PurgeInstanceCriteria
java.lang.Object
io.dapr.durabletask.PurgeInstanceCriteria
Class used for constructing orchestration instance purge selection criteria.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new, default instance of thePurgeInstanceCriteriaclass. -
Method Summary
Modifier and TypeMethodDescriptionGets the configured minimum orchestration creation time ornullif none was configured.Gets the configured maximum orchestration creation time ornullif none was configured.Gets the configured runtime status selection criteria.Gets the configured timeout duration ornullif none was configured.setCreatedTimeFrom(Instant createdTimeFrom) Purge orchestration instances that were created after the specified instant.setCreatedTimeTo(Instant createdTimeTo) Purge orchestration instances that were created before the specified instant.setRuntimeStatusList(List<OrchestrationRuntimeStatus> runtimeStatusList) Sets the list of runtime status values to use as a selection criteria.setTimeout(Duration timeout) Sets a timeout duration for the purge operation.
-
Constructor Details
-
PurgeInstanceCriteria
public PurgeInstanceCriteria()Creates a new, default instance of thePurgeInstanceCriteriaclass.
-
-
Method Details
-
setCreatedTimeFrom
Purge orchestration instances that were created after the specified instant.- Parameters:
createdTimeFrom- the minimum orchestration creation time to use as a selection criteria ornullto disable this selection criteria- Returns:
- this criteria object
-
setCreatedTimeTo
Purge orchestration instances that were created before the specified instant.- Parameters:
createdTimeTo- the maximum orchestration creation time to use as a selection criteria ornullto disable this selection criteria- Returns:
- this criteria object
-
setRuntimeStatusList
public PurgeInstanceCriteria setRuntimeStatusList(List<OrchestrationRuntimeStatus> runtimeStatusList) Sets the list of runtime status values to use as a selection criteria. Only orchestration instances that have a matching runtime status will be purged. An empty list is the same as selecting for all runtime status values.- Parameters:
runtimeStatusList- the list of runtime status values to use as a selection criteria- Returns:
- this criteria object
-
setTimeout
Sets a timeout duration for the purge operation. Setting tonullwill reset the timeout to be the default value.- Parameters:
timeout- the amount of time to wait for the purge instance operation to complete- Returns:
- this criteria object
-
getCreatedTimeFrom
Gets the configured minimum orchestration creation time ornullif none was configured.- Returns:
- the configured minimum orchestration creation time or
nullif none was configured
-
getCreatedTimeTo
Gets the configured maximum orchestration creation time ornullif none was configured.- Returns:
- the configured maximum orchestration creation time or
nullif none was configured
-
getRuntimeStatusList
Gets the configured runtime status selection criteria.- Returns:
- the configured runtime status filter as a list of values
-
getTimeout
Gets the configured timeout duration ornullif none was configured.- Returns:
- the configured timeout
-