cartridge-java
cartridge-java copied to clipboard
Add an option for specifying the request timeout per single call
Sometimes we do not want to change the default timeout for all the application code, but just add more time for a particular call (e.g. a large select). In that case, it may be useful to pass a special requestTimeout
parameter to the request. We already have the "options" parameter for each call, which makes it possible to pass the new parameter there.
Proposal:
- new field
requestTimeout
inoptions
parameter for each call type (we may add it directly here or make a new base derived class) - pass that parameter in the base client implementation first to sendRequest, then to submitRequest
- if the
options
orrequestTimeout
there are not specified, use the existing behavior - the default request timeout from the global config