@@ -22,7 +22,6 @@ public final class DurableTaskGrpcWorkerBuilder {
2222 Duration maximumTimerInterval ;
2323 DurableTaskGrpcWorkerVersioningOptions versioningOptions ;
2424 int maxConcurrentEntityWorkItems = 1 ;
25- int maxConcurrentActivityWorkItems ;
2625 int maxWorkItemThreads ;
2726
2827 /**
@@ -96,16 +95,16 @@ public DurableTaskGrpcWorkerBuilder addEntity(String name, TaskEntityFactory fac
9695 /**
9796 * Registers an entity type for the constructed {@link DurableTaskGrpcWorker}.
9897 * <p>
99- * The entity class must implement {@link ITaskEntity } and have a public no-argument constructor.
98+ * The entity class must implement {@link TaskEntity } and have a public no-argument constructor.
10099 * A new instance of the entity is created for each operation batch using reflection.
101100 * <p>
102101 * The entity name is derived from the simple class name of the provided type.
103102 *
104- * @param entityClass the entity class to register; must implement {@link ITaskEntity }
103+ * @param entityClass the entity class to register; must implement {@link TaskEntity }
105104 * @return this builder object
106- * @throws IllegalArgumentException if the class does not implement {@link ITaskEntity }
105+ * @throws IllegalArgumentException if the class does not implement {@link TaskEntity }
107106 */
108- public DurableTaskGrpcWorkerBuilder addEntity (Class <? extends ITaskEntity > entityClass ) {
107+ public DurableTaskGrpcWorkerBuilder addEntity (Class <? extends TaskEntity > entityClass ) {
109108 if (entityClass == null ) {
110109 throw new IllegalArgumentException ("entityClass must not be null." );
111110 }
@@ -116,21 +115,21 @@ public DurableTaskGrpcWorkerBuilder addEntity(Class<? extends ITaskEntity> entit
116115 /**
117116 * Registers an entity type with a specific name for the constructed {@link DurableTaskGrpcWorker}.
118117 * <p>
119- * The entity class must implement {@link ITaskEntity } and have a public no-argument constructor.
118+ * The entity class must implement {@link TaskEntity } and have a public no-argument constructor.
120119 * A new instance of the entity is created for each operation batch using reflection.
121120 *
122121 * @param name the name of the entity type
123- * @param entityClass the entity class to register; must implement {@link ITaskEntity }
122+ * @param entityClass the entity class to register; must implement {@link TaskEntity }
124123 * @return this builder object
125- * @throws IllegalArgumentException if the class does not implement {@link ITaskEntity }
124+ * @throws IllegalArgumentException if the class does not implement {@link TaskEntity }
126125 */
127- public DurableTaskGrpcWorkerBuilder addEntity (String name , Class <? extends ITaskEntity > entityClass ) {
126+ public DurableTaskGrpcWorkerBuilder addEntity (String name , Class <? extends TaskEntity > entityClass ) {
128127 if (entityClass == null ) {
129128 throw new IllegalArgumentException ("entityClass must not be null." );
130129 }
131- if (!ITaskEntity .class .isAssignableFrom (entityClass )) {
130+ if (!TaskEntity .class .isAssignableFrom (entityClass )) {
132131 throw new IllegalArgumentException (
133- String .format ("Type %s does not implement ITaskEntity ." , entityClass .getName ()));
132+ String .format ("Type %s does not implement TaskEntity ." , entityClass .getName ()));
134133 }
135134 return this .addEntity (name , () -> {
136135 try {
@@ -152,14 +151,14 @@ public DurableTaskGrpcWorkerBuilder addEntity(String name, Class<? extends ITask
152151 * <p>
153152 * <b>Thread safety warning:</b> Because the same instance handles all operation batches,
154153 * the entity implementation must be thread-safe if concurrent entity work items are enabled.
155- * Implementations that extend {@link TaskEntity } store mutable state in instance fields and
154+ * Implementations that extend {@link AbstractTaskEntity } store mutable state in instance fields and
156155 * are <b>not</b> safe for singleton registration. Use {@link #addEntity(Class)} or
157156 * {@link #addEntity(String, Class)} instead to create a new instance per batch.
158157 *
159158 * @param entity the entity instance to register
160159 * @return this builder object
161160 */
162- public DurableTaskGrpcWorkerBuilder addEntity (ITaskEntity entity ) {
161+ public DurableTaskGrpcWorkerBuilder addEntity (TaskEntity entity ) {
163162 if (entity == null ) {
164163 throw new IllegalArgumentException ("entity must not be null." );
165164 }
@@ -174,15 +173,15 @@ public DurableTaskGrpcWorkerBuilder addEntity(ITaskEntity entity) {
174173 * <p>
175174 * <b>Thread safety warning:</b> Because the same instance handles all operation batches,
176175 * the entity implementation must be thread-safe if concurrent entity work items are enabled.
177- * Implementations that extend {@link TaskEntity } store mutable state in instance fields and
176+ * Implementations that extend {@link AbstractTaskEntity } store mutable state in instance fields and
178177 * are <b>not</b> safe for singleton registration. Use {@link #addEntity(String, Class)} instead
179178 * to create a new instance per batch.
180179 *
181180 * @param name the name of the entity type
182181 * @param entity the entity instance to register
183182 * @return this builder object
184183 */
185- public DurableTaskGrpcWorkerBuilder addEntity (String name , ITaskEntity entity ) {
184+ public DurableTaskGrpcWorkerBuilder addEntity (String name , TaskEntity entity ) {
186185 if (entity == null ) {
187186 throw new IllegalArgumentException ("entity must not be null." );
188187 }
@@ -260,25 +259,7 @@ public DurableTaskGrpcWorkerBuilder maxConcurrentEntityWorkItems(int maxConcurre
260259 }
261260
262261 /**
263- * Sets the maximum number of activity work items that can be processed concurrently by this worker.
264- * <p>
265- * The sidecar enforces this limit by controlling how many activity work items are dispatched
266- * to this worker at a time. The default value is 10.
267- *
268- * @param maxConcurrentActivityWorkItems the maximum number of concurrent activity work items (must be at least 1)
269- * @return this builder object
270- * @throws IllegalArgumentException if the value is less than 1
271- */
272- public DurableTaskGrpcWorkerBuilder maxConcurrentActivityWorkItems (int maxConcurrentActivityWorkItems ) {
273- if (maxConcurrentActivityWorkItems < 1 ) {
274- throw new IllegalArgumentException ("maxConcurrentActivityWorkItems must be at least 1." );
275- }
276- this .maxConcurrentActivityWorkItems = maxConcurrentActivityWorkItems ;
277- return this ;
278- }
279-
280- /**
281- * Sets the maximum number of threads used for processing activity and entity work items.
262+ * Sets the maximum number of threads used for processing entity work items.
282263 * <p>
283264 * The default value is {@value DurableTaskGrpcWorker#DEFAULT_MAX_WORK_ITEM_THREADS}.
284265 * Threads are created on demand and idle threads are reclaimed after 60 seconds.
0 commit comments