@@ -243,6 +243,111 @@ public T handshakeTimeout(long timeout, TimeUnit unit) {
243
243
throw new UnsupportedOperationException ();
244
244
}
245
245
246
+ /**
247
+ * Sets the time without read activity before sending a keepalive ping. An unreasonably small
248
+ * value might be increased, and {@code Long.MAX_VALUE} nano seconds or an unreasonably large
249
+ * value will disable keepalive. The typical default is infinite when supported.
250
+ *
251
+ * @throws UnsupportedOperationException if unsupported
252
+ * @since 1.47.0
253
+ */
254
+ @ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/9009" )
255
+ public T keepAliveTime (long keepAliveTime , TimeUnit timeUnit ) {
256
+ throw new UnsupportedOperationException ();
257
+ }
258
+
259
+ /**
260
+ * Sets a time waiting for read activity after sending a keepalive ping. If the time expires
261
+ * without any read activity on the connection, the connection is considered dead. An unreasonably
262
+ * small value might be increased. Defaults to 20 seconds when supported.
263
+ *
264
+ * <p>This value should be at least multiple times the RTT to allow for lost packets.
265
+ *
266
+ * @throws UnsupportedOperationException if unsupported
267
+ * @since 1.47.0
268
+ */
269
+ @ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/9009" )
270
+ public T keepAliveTimeout (long keepAliveTimeout , TimeUnit timeUnit ) {
271
+ throw new UnsupportedOperationException ();
272
+ }
273
+
274
+ /**
275
+ * Sets the maximum connection idle time, connections being idle for longer than which will be
276
+ * gracefully terminated. Idleness duration is defined since the most recent time the number of
277
+ * outstanding RPCs became zero or the connection establishment. An unreasonably small value might
278
+ * be increased. {@code Long.MAX_VALUE} nano seconds or an unreasonably large value will disable
279
+ * max connection idle.
280
+ *
281
+ * @throws UnsupportedOperationException if unsupported
282
+ * @since 1.47.0
283
+ */
284
+ @ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/9009" )
285
+ public T maxConnectionIdle (long maxConnectionIdle , TimeUnit timeUnit ) {
286
+ throw new UnsupportedOperationException ();
287
+ }
288
+
289
+ /**
290
+ * Sets the maximum connection age, connections lasting longer than which will be gracefully
291
+ * terminated. An unreasonably small value might be increased. A random jitter of +/-10% will be
292
+ * added to it. {@code Long.MAX_VALUE} nano seconds or an unreasonably large value will disable
293
+ * max connection age.
294
+ *
295
+ * @throws UnsupportedOperationException if unsupported
296
+ * @since 1.47.0
297
+ */
298
+ @ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/9009" )
299
+ public T maxConnectionAge (long maxConnectionAge , TimeUnit timeUnit ) {
300
+ throw new UnsupportedOperationException ();
301
+ }
302
+
303
+ /**
304
+ * Sets the grace time for the graceful connection termination. Once the max connection age
305
+ * is reached, RPCs have the grace time to complete. RPCs that do not complete in time will be
306
+ * cancelled, allowing the connection to terminate. {@code Long.MAX_VALUE} nano seconds or an
307
+ * unreasonably large value are considered infinite.
308
+ *
309
+ * @throws UnsupportedOperationException if unsupported
310
+ * @see #maxConnectionAge(long, TimeUnit)
311
+ * @since 1.47.0
312
+ */
313
+ @ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/9009" )
314
+ public T maxConnectionAgeGrace (long maxConnectionAgeGrace , TimeUnit timeUnit ) {
315
+ throw new UnsupportedOperationException ();
316
+ }
317
+
318
+ /**
319
+ * Specify the most aggressive keep-alive time clients are permitted to configure. The server will
320
+ * try to detect clients exceeding this rate and when detected will forcefully close the
321
+ * connection. The typical default is 5 minutes when supported.
322
+ *
323
+ * <p>Even though a default is defined that allows some keep-alives, clients must not use
324
+ * keep-alive without approval from the service owner. Otherwise, they may experience failures in
325
+ * the future if the service becomes more restrictive. When unthrottled, keep-alives can cause a
326
+ * significant amount of traffic and CPU usage, so clients and servers should be conservative in
327
+ * what they use and accept.
328
+ *
329
+ * @throws UnsupportedOperationException if unsupported
330
+ * @see #permitKeepAliveWithoutCalls(boolean)
331
+ * @since 1.47.0
332
+ */
333
+ @ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/9009" )
334
+ public T permitKeepAliveTime (long keepAliveTime , TimeUnit timeUnit ) {
335
+ throw new UnsupportedOperationException ();
336
+ }
337
+
338
+ /**
339
+ * Sets whether to allow clients to send keep-alive HTTP/2 PINGs even if there are no outstanding
340
+ * RPCs on the connection. Defaults to {@code false} when supported.
341
+ *
342
+ * @throws UnsupportedOperationException if unsupported
343
+ * @see #permitKeepAliveTime(long, TimeUnit)
344
+ * @since 1.47.0
345
+ */
346
+ @ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/9009" )
347
+ public T permitKeepAliveWithoutCalls (boolean permit ) {
348
+ throw new UnsupportedOperationException ();
349
+ }
350
+
246
351
/**
247
352
* Sets the maximum message size allowed to be received on the server. If not called,
248
353
* defaults to 4 MiB. The default provides protection to servers who haven't considered the
0 commit comments