01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.admin.dso;
05:
06: import com.tc.admin.ConnectionContext;
07: import com.tc.admin.common.XTreeModel;
08: import com.tc.admin.common.XTreeNode;
09:
10: import com.tc.objectserver.lockmanager.api.LockMBean;
11:
12: public class LockTreeModel extends XTreeModel {
13: private ConnectionContext m_cc;
14:
15: public LockTreeModel(ConnectionContext cc) {
16: super ();
17: m_cc = cc;
18: }
19:
20: public void setLocks(LockMBean[] locks) {
21: XTreeNode rootNode = (XTreeNode) getRoot();
22:
23: rootNode.tearDownChildren();
24:
25: for (int i = 0; i < locks.length; i++) {
26: insertNodeInto(new LockTreeNode(m_cc, locks[i]), rootNode,
27: i);
28: }
29:
30: nodeStructureChanged(rootNode);
31: }
32: }
|