Details
-
Question
-
Status: Closed
-
Blocker
-
Resolution: Invalid
-
jcs-1.3
-
None
-
java 6 , windows xp
Description
We will use JCS to create a large number of (large) objects on disk with a smal javaheap size. So I set MaxPurgatorySize=100 and wrote 100000 objects to the cache
id is the counter of the for loop as String.
jcs.putInGroup(id,"aGroup",object);
After this, I tried to read this objects, in an other loop
final int x = (int) (100000*Math.random());
jcs.getFromGroup( "" + x , "aGroup").
get FromGroup will return null in 50% of the cases. What is going wrong?!
I get the cache using
jcs = JCS.getInstance("myRegion1");
I can't increase MaxPurgatorySize=100, because we will work (test working) with a minimum of java heapsize.
Here is my configuration:
#############################################################
-
-
-
-
- Default Region Configuration
jcs.default=DC
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=100
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=false
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
- Default Region Configuration
-
-
-
##############################################################
-
-
-
-
- CACHE REGIONS
jcs.region.myRegion1=DC
jcs.region.myRegion1.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.region.myRegion1.cacheattributes.MaxObjects=1000000
jcs.region.myRegion1.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.myRegion1.cacheattributes.DiskUsagePattern=UPDATE
############################################################## - AUXILIARY CACHES
- CACHE REGIONS
-
-
-
- Indexed Disk Cache
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=dump
jcs.auxiliary.DC.attributes.MaxPurgatorySize=100
jcs.auxiliary.DC.attributes.MaxKeySize=-1
jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=3000000
jcs.auxiliary.DC.attributes.OptimizeOnShutdown=true
jcs.auxiliary.DC.attributes.MaxRecycleBinSize=7500