[
http://jira.jboss.com/jira/browse/JBCACHE-941?page=comments#action_12351170 ]
Manik Surtani commented on JBCACHE-941:
---------------------------------------
Sounds interesting. Want to start a forum thread to discuss this? I see a few congruent
lines, one being PojoCache and the other being the JSR-107 compliant JCACHE interface.
Either way though, this would probably be something for the 2.1.0/2.2.0 timeframe.
org.jboss.cache.Caches, which allows for users to access a Cache
using various collection interfaces
----------------------------------------------------------------------------------------------------
Key: JBCACHE-941
URL:
http://jira.jboss.com/jira/browse/JBCACHE-941
Project: JBoss Cache
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Reporter: Elias Ross
Assigned To: Manik Surtani
Attachments: Caches.java, CachesTest.java
The java.util.Collections utility class supplies useful methods for dealing with legacy
interfaces and wrapping collection classes for concurrency, type safety, read-only, etc.
In a simiilar vein, I wrote a "Caches" class that returns java.util.Map
instances for a Node, which allow data to be modified through the standard Map interface.
This I expect to be extremely useful for allowing uses to integrate their existing
application with JBoss Cache, and will eliminate some of the confusion of using a new API
and they can use the API they know best. Users also often demand an API which is
"generic" so that their code is not tied to a particular vendor.
There are basically two methods in Caches, one looks like this:
Cache cache = DefaultCacheFactory.getInstance().createCache();
Map m = Caches.asMap(cache);
m.put("foo", "bar");
The API and examples explain themselves.
"Caches" could also include other useful methods for printing or reporting.
Note that this functionality could be considered duplicated from PojoCache...)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira