org.modeshape.graph.connector.inmemory
Class InMemoryNode

java.lang.Object
  extended by org.modeshape.graph.connector.base.MapNode
      extended by org.modeshape.graph.connector.inmemory.InMemoryNode
All Implemented Interfaces:
Serializable, Cloneable, Node

public class InMemoryNode
extends MapNode

A specialization of the MapNode.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.modeshape.graph.connector.base.MapNode
MapNode.Changes
 
Field Summary
 
Fields inherited from class org.modeshape.graph.connector.base.MapNode
changes
 
Constructor Summary
InMemoryNode(UUID uuid)
          Create a new in-memory node.
InMemoryNode(UUID uuid, Path.Segment name, UUID parent, Iterable<Property> properties, List<UUID> children)
          Create a new in-memory node.
InMemoryNode(UUID uuid, Path.Segment name, UUID parent, Map<Name,Property> properties, List<UUID> children)
          Create a new in-memory node.
 
Method Summary
 InMemoryNode clone()
           This method never clones the changes.
 InMemoryNode freeze()
          Return the frozen node with all internal state reflective of any changes.
 
Methods inherited from class org.modeshape.graph.connector.base.MapNode
equals, getChildren, getName, getParent, getProperties, getProperty, getUuid, getVersion, hasChanges, hashCode, newChanges, toString, withChild, withChild, withName, withoutChild, withoutChildren, withoutProperties, withoutProperty, withParent, withProperties, withProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InMemoryNode

public InMemoryNode(UUID uuid,
                    Path.Segment name,
                    UUID parent,
                    Map<Name,Property> properties,
                    List<UUID> children)
Create a new in-memory node.

Parameters:
uuid - the desired UUID; never null
name - the name of the new node; may be null if the name is not known and there is no parent
parent - the UUID of the parent node; may be null if this is the root node and there is no name
properties - the properties; may be null if there are no properties
children - the list of child nodes; may be null

InMemoryNode

public InMemoryNode(UUID uuid,
                    Path.Segment name,
                    UUID parent,
                    Iterable<Property> properties,
                    List<UUID> children)
Create a new in-memory node.

Parameters:
uuid - the desired UUID; never null
name - the name of the new node; may be null if the name is not known and there is no parent
parent - the UUID of the parent node; may be null if this is the root node and there is no name
properties - the properties; may be null if there are no properties
children - the list of child nodes; may be null

InMemoryNode

public InMemoryNode(UUID uuid)
Create a new in-memory node.

Parameters:
uuid - the desired UUID; never null
Method Detail

freeze

public InMemoryNode freeze()
Return the frozen node with all internal state reflective of any changes. If this node has no changes, this method simply returns this same node. Otherwise, this method creates a new node that has no changes and that mirrors this node's current state, and this new node will have an incremented version number.

Overrides:
freeze in class MapNode
Returns:
the unfrozen node; never null
See Also:
MapNode.freeze()

clone

public InMemoryNode clone()

This method never clones the changes.

This method never clones the changes.

Overrides:
clone in class MapNode
See Also:
Object.clone()


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.