Skip to content

Commit e7767d7

Browse files
committed
addressed PR feedback
1 parent fe65bf4 commit e7767d7

4 files changed

Lines changed: 411 additions & 3 deletions

File tree

client/src/main/java/com/microsoft/durabletask/DurableTaskClient.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,12 @@ public abstract OrchestrationMetadata waitForInstanceCompletion(
240240
*
241241
* @param query filter criteria: completion-time window, terminal runtime statuses, page size, and pagination cursor
242242
* @return a page of matching instance IDs and a cursor for the next page
243+
* @throws UnsupportedOperationException if the current client implementation does not support listing instance IDs
243244
*/
244-
public abstract ListInstanceIdsResult listInstanceIds(ListInstanceIdsQuery query);
245+
public ListInstanceIdsResult listInstanceIds(ListInstanceIdsQuery query) {
246+
throw new UnsupportedOperationException(
247+
"Listing instance IDs is not supported by this client implementation.");
248+
}
245249

246250
/**
247251
* Gets the full history of an orchestration instance as an ordered list of {@link HistoryEvent} objects.
@@ -251,8 +255,12 @@ public abstract OrchestrationMetadata waitForInstanceCompletion(
251255
*
252256
* @param instanceId the unique ID of the orchestration instance whose history to fetch
253257
* @return the instance's history events in order; empty if the instance has no history
258+
* @throws UnsupportedOperationException if the current client implementation does not support history retrieval
254259
*/
255-
public abstract List<HistoryEvent> getOrchestrationHistory(String instanceId);
260+
public List<HistoryEvent> getOrchestrationHistory(String instanceId) {
261+
throw new UnsupportedOperationException(
262+
"Retrieving orchestration history is not supported by this client implementation.");
263+
}
256264

257265
/**
258266
* Initializes the target task hub data store.

client/src/main/java/com/microsoft/durabletask/ListInstanceIdsQuery.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,14 @@ public ListInstanceIdsQuery setCompletedTimeTo(@Nullable Instant completedTimeTo
6868
* A page may contain fewer IDs than the page size even when more results exist; always use
6969
* {@link ListInstanceIdsResult#getContinuationToken()} to determine whether to continue paging.
7070
*
71-
* @param pageSize the maximum number of instance IDs to return per page
71+
* @param pageSize the maximum number of instance IDs to return per page; must be greater than zero
7272
* @return this query object
73+
* @throws IllegalArgumentException if {@code pageSize} is less than 1
7374
*/
7475
public ListInstanceIdsQuery setPageSize(int pageSize) {
76+
if (pageSize < 1) {
77+
throw new IllegalArgumentException("pageSize must be at least 1.");
78+
}
7579
this.pageSize = pageSize;
7680
return this;
7781
}

0 commit comments

Comments
 (0)