[jboss-jira] [JBoss JIRA] Closed: (JBCACHE-911) Remove or refactor NodeFactory

Manik Surtani (JIRA) jira-events at jboss.com
Wed Jan 17 11:59:52 EST 2007


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

Manik Surtani closed JBCACHE-911.
---------------------------------

    Resolution: Done

Has been refactored

> Remove or refactor NodeFactory
> ------------------------------
>
>                 Key: JBCACHE-911
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-911
>             Project: JBoss Cache
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>            Reporter: Elias Ross
>         Assigned To: Manik Surtani
>
> I don't see any external use for this class in 2.0 and think it's quite ugly. There is no way to configure the behavior. Users shouldn't use it anyway.
> Places it is called:
> * NodeImpl.getOrCreateChild() -> I'm thinking that adding a "template method" to say AbstractNode
>  protected abstract Node createNode(Fqn child_fqn, Node parent, TreeCache x);
> would be good. OptimisticNode or WorkspaceNode can obviously override this.
> * TreeCache {}: Since it's configuration driven, map an "enum" to a series of "new NodeXYZ()" statements.
> * OptimisticXYZInterceptor : Create factory methods in TransactionWorkspace
> * DefaultStateTransferIntegrator : ?? 
>          Node target = factory.createDataNode(nodeType, name, fqn, parent, nd.getAttributes(), false, null, cache.getCacheSPI());
>          ((DataNode) parent).addChild(name, target);
> Should simply be able to call parent.addChild(name) here. There is the (small) optimization of reusing the attribute Map directly, but this is probably a premature optimization. Or, maybe just parent.put(name, nd.getAttributes()) ?

-- 
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