jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Smuts <aasm...@wisc.edu>
Subject RE: Access to All Disk Cache Items
Date Mon, 19 Jan 2004 05:45:38 GMT
I can't think of a clean way to do it.  The disk cache is treated pretty
much as one of the other auxiliary caches.  Nothing like this was built
into the interfaces for any of the remote auxiliaries, since for them it
wouldn't be very useful.  

Another reason why this doesn't exist for disk caches is that JCS
requires a memory cache but not a disk.  Also, you could have more than
one disk.  The auxiliaries are typed.  Basically you'd need a method
that would expose all the auxiliaries plugged into the hub, then you'd
have to iterate through them looking for disk caches, then if a method
existed, cast to the appropriate interface and then call it.  Let me
think a bit longer about this.

For testing purposes, you don't absolutely need this.  You can set the
memory size to 0, put in a bunch of stuff, and then try to get it out.
You put it in, you know the keys, so you can get it out.  If it comes
back it was on disk.  This is basically what the simple build tests do

Another reason why there are not many ways to get all the keys is that
such a list can only be used why the cache is inactive, else it gets all
messed up.  There is no good way to iterate through the keys of an
active map.  The current method should copy the key list and then give
you a copy.  If something is removed during the copy, the copy should
fail.  Priority is given to the normal use, not the diagnostic.


> -----Original Message-----
> From: ankur.kumar@axa.com.au [mailto:ankur.kumar@axa.com.au]
> Sent: Sunday, January 18, 2004 11:17 PM
> To: Turbine JCS Users List
> Subject: Access to All Disk Cache Items
> I want to access all disk cache items through a Java program as I'm
> writing a Cache Debugger/Analyzer.
>  I can easily access CompositeCache, which helps me to go through all
> cache objects present in memory like:
>       memoryCache = cache.getMemoryCache();
>       Object keyObjects[] = memoryCache.getKeyArray();
>         for(int i=0; i<keyObjects.length; i++){
>         ...................
> Can I get access to disk cache items in the same way using
> *******
> Important Note
> This email (including any attachments) contains information which is
> confidential and may be subject to legal privilege.  If you are not
> the intended recipient you must not use, distribute or copy this
> email.  If you have received this email in error please notify the
> sender immediately and delete this email. Any views expressed in this
> email are not necessarily the views of AXA.   Thank you.
> *******

To unsubscribe, e-mail: turbine-jcs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-user-help@jakarta.apache.org

View raw message