incubator-directmemory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject again on fluent APIs... feedbacks on ideas
Date Thu, 16 Feb 2012 16:35:56 GMT
Hi all guys,

my "apache-commons" background doesn't want to shut-up, so I would
like to focus your attention on how improving the core APIs:

I've been looking at the CacheService interface for a while and
prototyped a kind of fluent DSL, so instead of having:

    Pointer pointer = putByteArray( String key, byte[] payload, int expiresIn );

It would be replaced by

    Pointer pointer = putByteArray( payload ).identifiedBy( key
).thatExpiresIn( expiresIn ).hours();

I know that following this approach we could lose the JCACHE
compatibility but... doesn't it look more sexy? :P

As Maurizio cited time ago, we could release the JCACHE adapter as a
separate module and... "Standards are paper. I use paper to wipe my
butt every day. That's how much that paper is worth." (Torvalds,
Linus, 2010-11-30)

WDYT? :)

best,
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/

Mime
View raw message