Skip to main content



      Home
Home » Modeling » EMF » [CDO] Configure release conditions for cached objects
[CDO] Configure release conditions for cached objects [message #1867803] Mon, 08 July 2024 04:00 Go to next message
Eclipse UserFriend
By default, there is some garbage collection for objects in the session cache. Is it possible to configure the behavior somehow?

In my case, I want to keep the server as responsive as possible, even if this takes up more memory. So keeping everything in memory would be an option (but I also need to have persistence).
Re: [CDO] Configure release conditions for cached objects [message #1868142 is a reply to message #1867803] Thu, 11 July 2024 15:25 Go to previous messageGo to next message
Eclipse UserFriend
Before you activate your repository you can call repository.setRevisionManager(). The revision manager should be configured with a custom CDORevisionCache, The cache must extend the right base class, the one that is used without your customization (double-check the repository mode you're using, branchin g, auditing, or non-auditing). In your custom cache override createReference() to create strong references or override cleanReference() to change the eviction policy.
Re: [CDO] Configure release conditions for cached objects [message #1869261 is a reply to message #1868142] Wed, 07 August 2024 06:30 Go to previous message
Eclipse UserFriend
Thanks for the answer. That approach does indeed work. But in our case, the memory usage turned out to be too high. We are now keeping regular java references to the required objects so that they are not cleared from the cache.
Previous Topic:[CDO] commit in EmbeddedRepositoryExample
Next Topic:Do I need to dispose Observables created via EMFProperties/observe?
Goto Forum:
  


Current Time: Mon Jul 07 09:00:30 EDT 2025

Powered by FUDForum. Page generated in 0.05536 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top