@@ -49,7 +49,14 @@ public interface IOEndpoint {
4949 * the unit of work to be done by the endpoint.
5050 * @return whether the endpoint takes a work unit
5151 */
52+ @ Deprecated
5253 boolean allowsWorkUnit ();
54+ /**
55+ * Identifies whether the endpoint accepts a data structure that defines
56+ * constant input to provide to the endpoint.
57+ * @return whether the endpoint takes endpoint constants
58+ */
59+ boolean allowsEndpointConstants ();
5360 /**
5461 * Identifies whether the endpoint accepts one or more input data structures
5562 * to work on.
@@ -70,49 +77,57 @@ public interface IOEndpoint {
7077 interface BulkIOEndpointCaller {
7178 /**
7279 * Gets the current snapshot of the mutable endpoint state.
80+ * Provide a CallContext when constructing the bulk caller instead of using this deprecated method.
7381 * @return the data structure with the endpoint state
7482 */
7583 @ Deprecated
7684 InputStream getEndpointState ();
7785 /**
7886 * Initializes the endpoint state, typically prior to the first call.
87+ * Provide a CallContext when constructing the bulk caller instead of using this deprecated method.
7988 * @param endpointState the data structure for the endpoint state as a byte[] array
8089 */
8190 @ Deprecated
8291 void setEndpointState (byte [] endpointState );
8392 /**
8493 * Initializes the endpoint state, typically prior to the first call.
94+ * Provide a CallContext when constructing the bulk caller instead of using this deprecated method.
8595 * @param endpointState the data structure for the endpoint state as an InputStream
8696 */
8797 @ Deprecated
8898 void setEndpointState (InputStream endpointState );
8999 /**
90100 * Initializes the endpoint state, typically prior to the first call.
101+ * Provide a CallContext when constructing the bulk caller instead of using this deprecated method.
91102 * @param endpointState the data structure for the endpoint state as a bufferable handle
92103 */
93104 @ Deprecated
94105 void setEndpointState (BufferableHandle endpointState );
95106
96107 /**
97108 * Gets the definition for the unit of work to be done by the endpoint.
109+ * Provide a CallContext with endpoint constants when constructing the bulk caller instead of using this deprecated method.
98110 * @return the data structure for the unit of work
99111 */
100112 @ Deprecated
101113 InputStream getWorkUnit ();
102114 /**
103- * Initializes the defintion of the work unit prior to the first call.
115+ * Initializes the definition of the work unit prior to the first call.
116+ * Provide a CallContext with endpoint constants when constructing the bulk caller instead of using this deprecated method.
104117 * @param workUnit the data structure for the work unit as a byte[] array
105118 */
106119 @ Deprecated
107120 void setWorkUnit (byte [] workUnit );
108121 /**
109- * Initializes the defintion of the work unit prior to the first call.
122+ * Initializes the definition of the work unit prior to the first call.
123+ * Provide a CallContext with endpoint constants when constructing the bulk caller instead of using this deprecated method.
110124 * @param workUnit the data structure for the work unit as an InputStream
111125 */
112126 @ Deprecated
113127 void setWorkUnit (InputStream workUnit );
114128 /**
115- * Initializes the defintion of the work unit prior to the first call.
129+ * Initializes the definition of the work unit prior to the first call.
130+ * Provide a CallContext with endpoint constants when constructing the bulk caller instead of using this deprecated method.
116131 * @param workUnit the data structure for the work unit as a bufferable handle
117132 */
118133 @ Deprecated
@@ -128,52 +143,68 @@ interface BulkIOEndpointCaller {
128143 */
129144 void interrupt ();
130145
146+ /**
147+ * Indicates the disposition of an error.
148+ */
131149 enum ErrorDisposition {
132- RETRY , SKIP_CALL , STOP_CONTEXT_CALLS , STOP_ALL_CALLS ;
150+ RETRY , SKIP_CALL , STOP_ALL_CALLS ;
133151 }
134152 }
135153 /**
136- * Gets the current snapshot of the endpoint state, work unit and session.
137- * @return the data structure with the endpoint state, work unit and session.
154+ * Constructs a context for the calls that specifying the optional endpoint constants,
155+ * endpoint state, and session.
156+ * @return the context for calls
138157 */
139158 CallContext newCallContext ();
140159
160+ /**
161+ * Provides the optional endpoint constants, endpoint state, and session as a context
162+ * for calls to the server.
163+ */
141164 interface CallContext {
142165 /**
143- * Gets the current snapshot of the mutable endpoint state.
166+ * Gets the current snapshot of the mutable state of the endpoint .
144167 * @return the data structure with the endpoint state
145168 */
146169 BytesHandle getEndpointState ();
147170 /**
148- * Initializes the endpoint state.
149- * @param endpointState the data structure for the endpoint state as a bufferable handle
171+ * Initializes the stateful properties of the endpoint prior to the first call to the endpoint.
172+ * The endpoint returns the state as the first value in the response.
173+ * The caller resends the modified state on the next call to the endpoint.
174+ * @param endpointState the data structure for the endpoint state in a representation supported by a bufferable content handle
150175 * @return the callContext
151176 */
152177 CallContext withEndpointState (BufferableHandle endpointState );
153178 /**
154- * Initializes the endpoint state.
155- * @param endpointState the data structure for the endpoint state as an InputStream
179+ * Initializes the stateful properties of the endpoint prior to the first call to the endpoint.
180+ * The endpoint returns the state as the first value in the response.
181+ * The caller resends the modified state on the next call to the endpoint.
182+ * @param endpointState the data structure for the endpoint state in a representation supported by a bufferable content handle
156183 * @return the callContext
157184 */
158185 CallContext withEndpointStateAs (Object endpointState );
159186
160187 /**
161- * Gets the definition for the unit of work to be done by the endpoint.
162- * @return the data structure for the unit of work
188+ * Gets the definition for constant inputs to the endpoint.
189+ * @return the data structure for the constants
163190 */
164- BytesHandle getWorkUnit ();
191+ BytesHandle getEndpointConstants ();
165192 /**
166- * Initializes the defintion of the work unit.
167- * @param workUnit the data structure for the work unit as a bufferable handle
193+ * Sets the constant inputs prior to the first call to the endpoint.
194+ * Examples of such constants might include the query when paging
195+ * over a result set or the provenance when ingesting records.
196+ * @param constants the data structure in a representation supported by a bufferable content handle
168197 * @return the callContext
169198 */
170- CallContext withWorkUnit (BufferableHandle workUnit );
199+ CallContext withEndpointConstants (BufferableHandle constants );
171200 /**
172- * Initializes the defintion of the work unit.
173- * @param workUnit the data structure for the work unit as an InputStream
201+ * Sets the constant inputs prior to the first call to the endpoint.
202+ * Examples of such constants might include the query when paging
203+ * over a result set or the provenance when ingesting records.
204+ * @param constants the data structure in a representation supported by a bufferable content handle
174205 * @return the callContext
175206 */
176- CallContext withWorkUnitAs (Object workUnit );
207+ CallContext withEndpointConstantsAs (Object constants );
177208
178209 /**
179210 * Returns an identifier for an endpoint to use when accessing a session cache on the server.
0 commit comments