org.terracotta.context
Interface ContextListener


public interface ContextListener

The context graph mutation listener interface.


Method Summary
 void graphAdded(TreeNode parent, TreeNode added)
          Called when a new subgraph is attached.
 void graphRemoved(TreeNode parent, TreeNode removed)
          Called when a subgraph is detached.
 

Method Detail

graphAdded

void graphAdded(TreeNode parent,
                TreeNode added)
Called when a new subgraph is attached.

The parent node is the currently attached node to which the incoming graph has been attached. The added node is the newly attached sub-graph. The graph accessible beneath added may include sub-graphs that are already attached to this tree.

Parameters:
parent - parent of the new sub-graph
added - newly added sub-graph

graphRemoved

void graphRemoved(TreeNode parent,
                  TreeNode removed)
Called when a subgraph is detached.

The parent node the still attached node from which the outgoing graph has been detached. The removed node is the just detached sub-graph. The graph accessible beneath removed may include sub-graphs that are still attached to this tree.

Parameters:
parent - previous parent of the removed sub-graph
removed - the removed sub-graph


Copyright © 2015. All Rights Reserved.