|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IOPolicy<R>
An IOPolicy handles policies related to converting nodes to and
from byte representation as well as discrimination.
| Method Summary | |
|---|---|
RawNode |
chooseCanonical(List<org.planx.msd.graph.Compactor.Edge> eqCls)
Called during discrimination to choose the canonical node from among an equivalence class of nodes. |
void |
hardAddEdge(Locator parent,
int childIndex,
Locator childLoc)
Informs that the child identified by (parent, childIndex)
has been saved (or was already saved) with Locator
childLoc. |
Locator |
hardResolve(Locator parent,
int childIndex,
Locator child)
Completely resolves any indirections that may exist along the edge from (parent, childIndex) to child and returns a
Locator pointing to the actual child. |
boolean |
isOutside(Locator parent,
int childIndex,
Locator child)
Returns true if the child with the specified
Locator should be considered outside of the discrimination
area, and false if the node is inside. |
SystemNode |
loadChild(Locator parent,
int childIndex,
Locator child,
RelativeDualReference<Locator,R> parentRef)
Loads a child node with the specified Locator. |
Locator |
location(SystemNode node)
If the node is already saved, returns a Locator to its
position. |
void |
moveEdge(Locator parent,
int childIndex,
Locator oldChild,
Locator newChild)
Informs that a child pointer has been rewritten. |
void |
moveGlobalRoot(Locator oldLoc,
Locator newLoc)
Informs of the moving/merging of a global root, that is, a root referenced by an application. |
void |
moveLocalRoot(Locator oldLoc,
Locator newLoc)
Informs of the moving/merging of a local root, that is, a root referenced from outside the discrimination area. |
void |
nodeSaved(SystemNode node,
Locator loc)
Informs that a node has been saved at the specified location. |
void |
refreshAfter()
Should refresh incoming and outgoing edges if necessary. |
void |
refreshBefore()
Should refresh incoming and outgoing edges if necessary. |
Locator |
resolveRoot(Locator root)
|
void |
save(RawNode node)
Called after discrimination to allow a live node to synchronize unwritten state changes with its byte representation. |
void |
softAddEdge(Locator parent,
int childIndex,
Locator child)
Informs of the existence of an outgoing edge from a segment. |
Locator |
softResolve(Locator parent,
int childIndex,
Locator child)
Lazily resolves any indirections that may exist along the edge from (parent, childIndex) to child and returns a
Locator pointing to the actual child. |
| Method Detail |
|---|
Locator location(SystemNode node)
throws IOException
Locator to its
position. Otherwise returns null.
IOException
void nodeSaved(SystemNode node,
Locator loc)
throws IOException
Called when a SystemNode has been written in byte
representation.
IOException
Locator hardResolve(Locator parent,
int childIndex,
Locator child)
throws IOException
(parent, childIndex) to child and returns a
Locator pointing to the actual child.
Called when a node is being translated from byte representation.
IOException
Locator softResolve(Locator parent,
int childIndex,
Locator child)
throws IOException
(parent, childIndex) to child and returns a
Locator pointing to the actual child. Lazily means
resolving indirections without incurring a high cost (accessing
secondary storage, etc.).
Called when a node is being translated from byte representation.
IOException
Locator resolveRoot(Locator root)
throws IOException
IOException
SystemNode loadChild(Locator parent,
int childIndex,
Locator child,
RelativeDualReference<Locator,R> parentRef)
throws IOException
Locator. The method
is useful for allowing loads of foreign nodes. The method can also be
used to decide whether to proxy child nodes or load them recursively.
Called when a node is being translated from byte representation.
IOException
boolean isOutside(Locator parent,
int childIndex,
Locator child)
throws IOException
true if the child with the specified
Locator should be considered outside of the discrimination
area, and false if the node is inside.
Called during discrimination.
IOException
RawNode chooseCanonical(List<org.planx.msd.graph.Compactor.Edge> eqCls)
throws IOException
Called during discrimination.
IOException
void save(RawNode node)
throws IOException
Called after discrimination.
IOException
void refreshBefore()
throws IOException
Called before discrimination.
IOException
void refreshAfter()
throws IOException
Called after discrimination.
IOException
void hardAddEdge(Locator parent,
int childIndex,
Locator childLoc)
throws IOException
(parent, childIndex)
has been saved (or was already saved) with Locator
childLoc.
Called when a SystemNode is being written in byte
representation.
IOException
void moveEdge(Locator parent,
int childIndex,
Locator oldChild,
Locator newChild)
throws IOException
Called when a node is being translated from byte representation.
IOException
void softAddEdge(Locator parent,
int childIndex,
Locator child)
throws IOException
Called after discrimination.
IOException
void moveLocalRoot(Locator oldLoc,
Locator newLoc)
throws IOException
Called after discrimination.
IOException
void moveGlobalRoot(Locator oldLoc,
Locator newLoc)
throws IOException
Called after discrimination.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||