Package org.terracotta.context
Interface ContextListener
public interface ContextListener
The context graph mutation listener interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoidgraphAdded(TreeNode parent, TreeNode added) Called when a new subgraph is attached.voidgraphRemoved(TreeNode parent, TreeNode removed) Called when a subgraph is detached.
-
Method Details
-
graphAdded
Called when a new subgraph is attached.The
parentnode is the currently attached node to which the incoming graph has been attached. Theaddednode is the newly attached sub-graph. The graph accessible beneathaddedmay include sub-graphs that are already attached to this tree.- Parameters:
parent- parent of the new sub-graphadded- newly added sub-graph
-
graphRemoved
Called when a subgraph is detached.The
parentnode the still attached node from which the outgoing graph has been detached. Theremovednode is the just detached sub-graph. The graph accessible beneathremovedmay include sub-graphs that are still attached to this tree.- Parameters:
parent- previous parent of the removed sub-graphremoved- the removed sub-graph
-