Method Summary
All Methods Instance Methods Abstract Methods Default Methods
default void
Assigns the given ID to the given node.
int
Looks up the ID of the given node in this
Scope.
The index implementation associating object with IDs.
void
Assigns the given ID to the given node.
int
default void
Reads object data of the given node and assigns the given ID to this node.
Looks up the object with the given ID.
default void
Writes the given graph node to the given writer.
Method Details
resolveOrFail
Description copied from interface: Scope
Looks up the object with the given ID.
Specified by:
resolveOrFail in interface Scope
Parameters:
id - The ID of the requested object.
Returns:
The object with the given ID.
enter
Assigns the given ID to the given node.
readData
Description copied from interface: Scope
Reads object data of the given node and assigns the given ID to this node.
Specified by:
readData in interface Scope
Parameters:
node - The node to read data for.
id - The ID to assign ot the given node.
Throws:
IOException
writeRefOrData
Description copied from interface: Scope
Writes the given graph node to the given writer.
If the node has already an ID in this scope, only the ID is transmitted as plain numeric value. Otherwise, a
fresh ID is assigned to the node and the the full data of the given node is transmitted (by calling back to
SharedGraphNode.writeData(Scope, JsonWriter, int) ).
Specified by:
writeRefOrData in interface Scope
Parameters:
out - The JsonWriter to write to.
node - The graph node to transmit.
Throws:
IOException
id
Looks up the ID of the given node in this
Scope.
See Also:
initId
Assigns the given ID to the given node.
See Also:
newId
int newId ()
Creates a fresh ID.
index
The index implementation associating object with IDs.