public abstract class AbstractNodeFactory<K,V> extends Object implements NodeFactory<K,V>
CacheSPI
configuration.Modifier and Type | Field and Description |
---|---|
protected CacheSPI<K,V> |
cache |
protected CommandsFactory |
commandsFactory |
protected ComponentRegistry |
componentRegistry |
protected Configuration |
configuration |
protected DataContainer |
dataContainer |
protected InterceptorChain |
interceptorChain |
protected InvocationContextContainer |
invocationContextContainer |
protected boolean |
useVersionedNode |
Constructor and Description |
---|
AbstractNodeFactory() |
Modifier and Type | Method and Description |
---|---|
InternalNode<K,V> |
createChildNode(Fqn fqn,
InternalNode<K,V> parent,
InvocationContext ctx,
boolean attachToParent)
Creates a new node, and optionally attaches the node to its parent.
|
InternalNode<K,V> |
createInternalNode(Fqn fqn)
Creates an internal node.
|
protected UnversionedNode<K,V> |
createInternalNode(Object childName,
Fqn fqn,
NodeSPI<K,V> parent,
Map<K,V> data) |
NodeSPI<K,V> |
createNode(Fqn fqn,
NodeSPI<K,V> parent)
Creates a new, empty node.
|
NodeSPI<K,V> |
createNode(Fqn fqn,
NodeSPI<K,V> parent,
Map<K,V> data)
Creates a new node and populates its attributes.
|
NodeSPI<K,V> |
createNode(Object childName,
NodeSPI<K,V> parent)
Creates a new, empty node.
|
NodeSPI<K,V> |
createNode(Object childName,
NodeSPI<K,V> parent,
Map<K,V> data)
Creates a new node and populates its attributes.
|
NodeSPI<K,V> |
createRootNode() |
ReadCommittedNode |
createWrappedNode(InternalNode<K,V> node,
InternalNode<K,V> parent) |
WorkspaceNode<K,V> |
createWrappedNode(NodeSPI<K,V> dataNode,
TransactionWorkspace workspace) |
ReadCommittedNode |
createWrappedNodeForRemoval(Fqn fqn,
InternalNode<K,V> node,
InternalNode<K,V> parent) |
void |
injectDependencies(CacheSPI<K,V> cache,
Configuration configuration,
InvocationContextContainer invocationContextContainer,
InterceptorChain interceptorChain,
CommandsFactory commandsFactory) |
protected boolean useVersionedNode
protected Configuration configuration
protected InvocationContextContainer invocationContextContainer
protected InterceptorChain interceptorChain
protected CommandsFactory commandsFactory
protected ComponentRegistry componentRegistry
protected DataContainer dataContainer
public void injectDependencies(CacheSPI<K,V> cache, Configuration configuration, InvocationContextContainer invocationContextContainer, InterceptorChain interceptorChain, CommandsFactory commandsFactory)
public NodeSPI<K,V> createNode(Fqn fqn, NodeSPI<K,V> parent, Map<K,V> data)
NodeFactory
createNode
in interface NodeFactory<K,V>
public NodeSPI<K,V> createNode(Object childName, NodeSPI<K,V> parent, Map<K,V> data)
NodeFactory
createNode
in interface NodeFactory<K,V>
public NodeSPI<K,V> createNode(Fqn fqn, NodeSPI<K,V> parent)
NodeFactory
createNode
in interface NodeFactory<K,V>
public InternalNode<K,V> createInternalNode(Fqn fqn)
NodeFactory
NodeFactory.createNode(Fqn, NodeSPI)
except that the resultant node is not wrapped
in a NodeInvocationDelegate
.createInternalNode
in interface NodeFactory<K,V>
public NodeSPI<K,V> createNode(Object childName, NodeSPI<K,V> parent)
NodeFactory
createNode
in interface NodeFactory<K,V>
protected UnversionedNode<K,V> createInternalNode(Object childName, Fqn fqn, NodeSPI<K,V> parent, Map<K,V> data)
public WorkspaceNode<K,V> createWrappedNode(NodeSPI<K,V> dataNode, TransactionWorkspace workspace)
createWrappedNode
in interface NodeFactory<K,V>
public ReadCommittedNode createWrappedNode(InternalNode<K,V> node, InternalNode<K,V> parent)
createWrappedNode
in interface NodeFactory<K,V>
public ReadCommittedNode createWrappedNodeForRemoval(Fqn fqn, InternalNode<K,V> node, InternalNode<K,V> parent)
createWrappedNodeForRemoval
in interface NodeFactory<K,V>
public NodeSPI<K,V> createRootNode()
createRootNode
in interface NodeFactory<K,V>
public InternalNode<K,V> createChildNode(Fqn fqn, InternalNode<K,V> parent, InvocationContext ctx, boolean attachToParent)
NodeFactory
createChildNode
in interface NodeFactory<K,V>
fqn
- fqn of node to create. Must not be null or root.parent
- parent to attach to. Must not be null, even if attachToParent is false.ctx
- invocation context to register with. Must not be null.attachToParent
- if true, the node is registered in the parent's child map. If false, it is not.Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.