Create a pluggable PojoCache Collection class implementation
------------------------------------------------------------
Key: JBCACHE-893
URL:
http://jira.jboss.com/jira/browse/JBCACHE-893
Project: JBoss Cache
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: PojoCache
Reporter: Ben Wang
Assigned To: Ben Wang
Fix For: PojoCache
Currently PojoCache only supports a single flavor of Collection classes, e.g., HashMap,
HashSet, and ArrayList. To fully support different flavor of Collection implementation, we
can either:
1. Enable array interception from Jboss Aop such that we can instrument all Collection
implementation classes (including java.util.*). But JBoss Aop currently doesn't
support it yet, and issues of instrumenting the Sun system classes also is problematic.
2. Create a pluggable architecture for different flavor of Collection implementation.
I think Option #2 is more realistic now. What I propose is this:
1. Will need to implement a specific flavor of collection interceptor and cache impl.
E.g., in the case of List, it will be CachedListInterceptor and CachedListImpl.
2. Register the specific impl and the corresponding Collection class name to a registry
During runtime, when we encounter Collection classes, we will check the registry first to
see which interceptor (and the corresponding cache impl) that we will use for this case.
Performance impact should be minimal since this is needed only for attach phase.
--
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