30.3. Setting Timeouts

It is possible to configure a timeout value for the operation request; this is only used for remote requests and is configured per request. This means that local requests will never timeout, and if a failover occurs then each subsequent request will have a new timeout.
If no timeout is specified then the replication timeout will be used by default. This may be manually configured by using the timeout(long timeout, TimeUnit unit) method of the stream, as seen in the following example:
CacheStream<Object, String> stream = cache.entrySet().stream();
stream.timeout(1, TimeUnit.MINUTES);