org.jboss.cache
Class NodeFactory<K,V>
java.lang.Object
  
org.jboss.cache.factories.ComponentFactory
      
org.jboss.cache.NodeFactory<K,V>
public class NodeFactory<K,V>
- extends ComponentFactory
 
Generates new nodes based on the CacheSPI configuration.
- Author:
 
  - Manik Surtani (manik@jboss.org)
 
 
 
 
 
| 
Method Summary | 
protected 
 | 
construct(Class<T> componentType)
 
          Constructs a component. | 
 NodeSPI<K,V> | 
createDataNode(Object childName,
               Fqn fqn,
               NodeSPI<K,V> parent,
               Map<K,V> data,
               boolean mapSafe)
 
          Creates a new Node instance. | 
 Node<K,V> | 
createNode(Object childName,
           Node<K,V> parent,
           Map<K,V> data)
 
            | 
 Node<K,V> | 
createNodeOfType(Node<K,V> template,
                 Object childName,
                 Node<K,V> parent,
                 Map<K,V> data)
 
            | 
 NodeSPI<K,V> | 
createRootDataNode()
 
            | 
 WorkspaceNode<K,V> | 
createWorkspaceNode(NodeSPI<K,V> dataNode,
                    TransactionWorkspace workspace)
 
            | 
 void | 
init()
 
          Initialises the node factory with the configuration from the cache. | 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
NodeFactory
public NodeFactory(CacheSPI<K,V> cache)
- Constructs an instance of the factory
 
NodeFactory
public NodeFactory()
construct
protected <T> T construct(Class<T> componentType)
- Description copied from class: 
ComponentFactory 
- Constructs a component.
- Specified by:
 construct in class ComponentFactory
 
- Parameters:
 componentType - type of component
- Returns:
 - a component
 
 
 
init
public void init()
- Initialises the node factory with the configuration from the cache.
 
 
createDataNode
public NodeSPI<K,V> createDataNode(Object childName,
                                   Fqn fqn,
                                   NodeSPI<K,V> parent,
                                   Map<K,V> data,
                                   boolean mapSafe)
- Creates a new 
Node instance.
- Parameters:
 childName - the new node's namefqn - the new node's Fqnparent - the new node's parentdata - the new node's attribute mapmapSafe - true if param data can safely
                  be directly assigned to the new node's data field;
                  false if param data's contents
                  should be copied into the new node's data field.
- Returns:
 - the new node
 
 
 
createNode
public Node<K,V> createNode(Object childName,
                            Node<K,V> parent,
                            Map<K,V> data)
 
createNodeOfType
public Node<K,V> createNodeOfType(Node<K,V> template,
                                  Object childName,
                                  Node<K,V> parent,
                                  Map<K,V> data)
 
createWorkspaceNode
public WorkspaceNode<K,V> createWorkspaceNode(NodeSPI<K,V> dataNode,
                                              TransactionWorkspace workspace)
 
createRootDataNode
public NodeSPI<K,V> createRootDataNode()
 
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.