I think this a bug. Please create a Jira for it and assign to me.
Aren't the Collection Proxies simple wrappers over the actual collection,just the way EJBObjects are one layer over the actual beans?
Is there any reason why you need to create your own datastructures?
How do you compare the performance of your data structures over java's data structures?
No it is not a simple wrapper. The reason that it is not is because all the Collection data (e.g., in Map case, the key, value paris). So all these get/remove/iterator need to operate on the cache store data (instead of just in-memory data). This is how TreeCacheAop (or PojoCache as we call it now) work with POJO.
As a result, all the APIs need to be implemented accordingly to optimize the performance. As for performance, Scott has done some measurement. The key thing is when you have replication involved, the cost is usually assoicated with the serialization. So even when our proxy implementation is slower, that should not impact the overall performance. If it does, then we need to optimize it.