Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FF5610C7E for ; Thu, 10 Oct 2013 16:43:29 +0000 (UTC) Received: (qmail 55652 invoked by uid 500); 10 Oct 2013 16:43:25 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 55359 invoked by uid 500); 10 Oct 2013 16:43:25 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 55337 invoked by uid 99); 10 Oct 2013 16:43:21 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 16:43:21 +0000 Received: from localhost (HELO mail-wg0-f54.google.com) (127.0.0.1) (smtp-auth username britter, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Oct 2013 16:43:20 +0000 Received: by mail-wg0-f54.google.com with SMTP id m15so2867885wgh.9 for ; Thu, 10 Oct 2013 09:43:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=sx2JfvV4TpO+oPhNa0vAlMKNNTXr8nVcZddNW35Fn3Q=; b=lxpsLCFQb7605hC73Cjx9TQP37ORvOYEFzcp8ilTOoW8edQ16CW6Ryd0if77bgSQTK usfvciMS0ZVpXMNlQ8SyeUKRK55NC3IlfYmKlRghAWQ/kAlgqlpxlNSwR2m5Efs9lpq0 L+qj5iMlIPvsVEWXdssp6Ix12xL9CYzD47pCx2Kn4szziRpLoQYtaEovBd+aQRFSY1TU 9I1iTB2Fy4zjrtUwjQ7bRlCfmVi/zEiGIoQriEsIc8GsS+yp3LFRoQdBuwXJt9K9PPdP syb9cfFW/gEykkt+brukT4Xj3vXtu2+PcaiR0TLrkM/3yfa2PH4zZHwKcAQWpl/amcQO rA+g== MIME-Version: 1.0 X-Received: by 10.194.200.100 with SMTP id jr4mr12669346wjc.37.1381423399373; Thu, 10 Oct 2013 09:43:19 -0700 (PDT) Received: by 10.194.190.136 with HTTP; Thu, 10 Oct 2013 09:43:19 -0700 (PDT) In-Reply-To: <5256D681.7070904@apache.org> References: <524D5538.40102@apache.org> <5256D681.7070904@apache.org> Date: Thu, 10 Oct 2013 18:43:19 +0200 Message-ID: Subject: Re: Please? WAS: Re: [JCS] Asking for advice: separate CacheAccess and GroupCacheAccess? From: Benedikt Ritter To: Commons Developers List Content-Type: multipart/alternative; boundary=047d7bb03e1e01141904e865b352 --047d7bb03e1e01141904e865b352 Content-Type: text/plain; charset=ISO-8859-1 Sorry Thomas!!! I intended to have a look at this but then we started a lot of discussions here. I just forgot it. I'll try to have a look! Benedikt 2013/10/10 Thomas Vandahl > On 03.10.13 13:30, Thomas Vandahl wrote: > > Hi folks, > > > > I'd like to ask for suggestions for a problem solution regarding the > > typesafe handling of cache keys in JCS. > > > > Previously, JCS was not aware of key and value types. So it was possible > > to mix cache elements having different key types within the same cache > > instance. This "feature" was abused to implement the cache groups, so > > that keys of e.g. type String were combined with keys of type > GroupAttrName. > > > > The current implementation implements this functionality by hacking > > around the generics type definitions (in all cache implementations) > > which is definitely not desirable. It also may cause ClassCastExceptions. > > > > As I see it, it would be better to use some kind of decorator pattern > > for the GroupCacheAccess functions that wraps around a regular > > CacheAccess object. This would mean type-safety at the cost of major API > > changes. Also it would have the advantage that the cache implementations > > do not have to know about cache groups at all. > > > > Are there better solutions? Other ideas how to resolve this? > > Your thoughts are very much appreciated. > > No ideas? Really? Please help, I need a second opinion. > > Bye, Thomas. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > -- http://people.apache.org/~britter/ http://www.systemoutprintln.de/ http://twitter.com/BenediktRitter http://github.com/britter --047d7bb03e1e01141904e865b352--