[jboss-jira] [JBoss JIRA] Closed: (JBCACHE-914) Adapt JBCACHE-913 fix for JBC 2.0

Brian Stansberry (JIRA) jira-events at jboss.com
Tue Jan 2 23:02:28 EST 2007


     [ http://jira.jboss.com/jira/browse/JBCACHE-914?page=all ]

Brian Stansberry closed JBCACHE-914.
------------------------------------

    Fix Version/s: 2.0.0.ALPHA2
                       (was: 2.0.0.GA)
       Resolution: Done

> Adapt JBCACHE-913 fix for JBC 2.0
> ---------------------------------
>
>                 Key: JBCACHE-914
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-914
>             Project: JBoss Cache
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>            Reporter: Brian Stansberry
>         Assigned To: Brian Stansberry
>             Fix For: 2.0.0.ALPHA2
>
>
> Need to port JBCACHE-913 fix to HEAD, where the code works differently.
> Vladimir, I'm assigning this to you, because you are doing heavy lifting on state transfer and I don't want to step on you.  I experimented with adding the following to StateTransferManager and calling it in setState right after  the call to integrator.integrateState.  That made the unit test (o.j.c.eviction.StateTransferIntegrationTest) pass.  One concern I have is calling getChildren() on a node will end up pulling non-in-memory persisted nodes into RAM.  A look at NodeImpl makes me think that's not the case, but that could change.
>    /**
>     * Generates EvictedEventNode notifications for all nodes of the tree. This is
>     * called whenever the tree is initially retrieved (state transfer)
>     */
>    protected void notifyEvictionPolicyOfNodesCreated(Node curr)
>    {
>       Node n;
>       Set children;
>       if (curr == null) return;
>       
>       Fqn fqn = curr.getFqn();
>       
>       // JBCACHE-913
>       Region region = cache.getCacheSPI().getRegion(fqn, false);
>       if (region != null)
>       {
>          region.putNodeEvent(new EvictedEventNode(fqn, NodeEventType.ADD_NODE_EVENT));
>       }
>       
>       if ((children = curr.getChildren()) != null)
>       {
>          for (Iterator it = children.iterator(); it.hasNext();)
>          {
>             n = (Node) it.next();
>             notifyEvictionPolicyOfNodesCreated(n);
>          }
>       }
>    }
> Another approach would be to not bypass the interceptor chain when the integrator puts the node in the cache.  That's very clean. But then we have to make sure no unwanted things are done by any interceptors.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list