2 Replies Latest reply on Feb 8, 2006 5:15 PM by hmesha

    Newbie question of Eviction & Remove Listeners

    kuppusamy

      Hi,

      I am planning to implement JBoss Cache to the application I am working on. I have a database table which will be updated through a batch process every x hours depends upon the environment, Testing, Integration and Production.

      I saw eviction policy for nodes with time to live, etc., What exactly the difference between the eviction and removal? It just has time to live & max Age. Can I configure the eviction as from this hour evict every x hours like Timer ? Can I extend the eviction and implment this feature without impacting any JBoss Cache design?

      can I register a listener on a node by declaration ? For eg., updating a node. I saw the Cache Listener, but in that case I would have to check for the node key every time and do necessary action for a particular node.

      Thanks in Advance

      Regards
      Thiru

        • 1. Re: Newbie question of Eviction & Remove Listeners
          genman


          Removal refers to removing old data, including the underlying data store.

          Eviction is for removing from memory but maintaining the data on disk.

          • 2. Re: Newbie question of Eviction & Remove Listeners
            hmesha

            Removal is removing a node from the tree by the user on demand whereas eviction is automated remval of nodes based on the configured eviction policy. The eviction policy could be age based or time based. JBossCache has several eviction policy to choose from. Also, you can write your own custom eviction policy. Please see the documentation for more details. You can also register a cache listener to listen for changes on the tree and act on the emitted notification for a particular node.

            Cheers,

            Hany