You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2022/02/10 19:13:00 UTC

[jira] [Commented] (HTTPCLIENT-2204) MemcachedAsyncHttpCacheStorage should use MemcachedClientIF interface

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-2204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490453#comment-17490453 ] 

Oleg Kalnichevski commented on HTTPCLIENT-2204:
-----------------------------------------------

[~robokop] {{MemcachedClientIF}} for whatever reason does not provide any means of adding a completion callback to the {{Future}} objects returned by its async methods. That makes it pretty much useless for non-blocking operations with the cache.

*MemcachedClient*
```
public GetFuture<Object> asyncGet(final String key)
```
*MemcachedClientIF*
```
Future<Object> asyncGet(String key);
```
I am now considering reverting HTTPCLIENT-2202 for the sake of consistency.

Oleg

>  MemcachedAsyncHttpCacheStorage should use MemcachedClientIF interface
> ----------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2204
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2204
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpCache
>    Affects Versions: 5.0, 5.1, 5.1.1, 5.1.2, 5.1.3
>            Reporter: Robert Kennedy
>            Priority: Minor
>             Fix For: 5.2-alpha2
>
>
> Similar to HTTPCLIENT-2202 
>  
> There appears to be a regression from 4.x to 5.x in which [MemcachedHttpAsyncCacheStorage|https://github.com/apache/httpcomponents-client/blob/master/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/memcached/MemcachedHttpAsyncCacheStorage.java] now requires the MemcachedClient object instead of the interface MemcachedClientIF. The class doesn't use any functionality outside of the interface, so why require anything higher than the interface?
> Changing to use MemcachedClientIF would be backward compatible since MemcachedClient implements this interface already.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org