org.jboss.cache
Class NodeFactory<K,V>
java.lang.Object
org.jboss.cache.NodeFactory<K,V>
public class NodeFactory<K,V>
- extends java.lang.Object
Generates new nodes based on the CacheSPI
configuration.
- Author:
- Manik Surtani (manik@jboss.org)
Method Summary |
NodeSPI<K,V> |
createDataNode(java.lang.Object childName,
Fqn fqn,
NodeSPI<K,V> parent,
java.util.Map<K,V> data,
boolean mapSafe)
Creates a new Node instance. |
Node<K,V> |
createNode(java.lang.Object childName,
Node<K,V> parent,
java.util.Map<K,V> data)
|
Node<K,V> |
createNodeOfType(Node<K,V> template,
java.lang.Object childName,
Node<K,V> parent,
java.util.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
init
public void init()
- Initialises the node factory with the configuration from the cache.
createDataNode
public NodeSPI<K,V> createDataNode(java.lang.Object childName,
Fqn fqn,
NodeSPI<K,V> parent,
java.util.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(java.lang.Object childName,
Node<K,V> parent,
java.util.Map<K,V> data)
createNodeOfType
public Node<K,V> createNodeOfType(Node<K,V> template,
java.lang.Object childName,
Node<K,V> parent,
java.util.Map<K,V> data)
createWorkspaceNode
public WorkspaceNode<K,V> createWorkspaceNode(NodeSPI<K,V> dataNode,
TransactionWorkspace workspace)
createRootDataNode
public NodeSPI<K,V> createRootDataNode()