int objCount = session.get(SessionParameter.CACHE_SIZE_OBJECTS, CACHE_SIZE_OBJECTS);
if (objCount < 1) {
objCount = CACHE_SIZE_OBJECTS;
}
fLinkCache = new CacheImpl("Link Cache");
fLinkCache.initialize(new String[] {
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
LruCacheLevelImpl.class.getName() + " " + LruCacheLevelImpl.MAX_ENTRIES + "=" + objCount, // id
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=16", // rel
ContentTypeCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=3,"
+ MapCacheLevelImpl.SINGLE_VALUE + "=true" // type
});
fTypeLinkCache = new CacheImpl("Type Link Cache");
fTypeLinkCache.initialize(new String[] {
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
LruCacheLevelImpl.class.getName() + " " + LruCacheLevelImpl.MAX_ENTRIES + "=" + typeCount, // id
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=16", // rel
ContentTypeCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=3,"
+ MapCacheLevelImpl.SINGLE_VALUE + "=true"// type
});
fCollectionLinkCache = new CacheImpl("Collection Link Cache");
fCollectionLinkCache.initialize(new String[] {
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=8" // collection
});
fTemplateCache = new CacheImpl("URI Template Cache");
fTemplateCache.initialize(new String[] {
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=6" // type
});
fRepositoryLinkCache = new CacheImpl("Repository Link Cache");
fRepositoryLinkCache.initialize(new String[] {
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=" + repCount, // repository
MapCacheLevelImpl.class.getName() + " " + MapCacheLevelImpl.CAPACITY + "=6" // rel
});
}