/** Add a collection of new key/value pairs into the map. * The supplied map may contain any keys, but the values must be {@link Node}s. * * @param map the map with pairs to add */ protected final void putAll(final java.util.Map<? extends T,? extends Node> map) { try { PR.enterWriteAccess(); getMap().putAll(map); refreshImpl(); // PENDING sometime we should also call refreshKey... } finally { PR.exitWriteAccess(); } }
/** Add one key and one node to the list. * @param key the key * @param node the node */ protected final void put(final T key, final Node node) { try { PR.enterWriteAccess(); if (getMap().put(key, node) != null) { refreshKeyImpl(key); } else { refreshImpl(); } } finally { PR.exitWriteAccess(); } }
/** Add one key and one node to the list. * @param key the key * @param node the node */ protected final void put (final Object key, final Node node) { try { PR.enterWriteAccess (); if (nodes.put (key, node) != null) { refreshKeyImpl (key); } else { refreshImpl (); } } finally { PR.exitWriteAccess (); } }
/** Add a collection of new key/value pairs into the map. * The supplied map may contain any keys, but the values must be {@link Node}s. * * @param map the map with pairs to add */ protected final void putAll (final java.util.Map map) { try { PR.enterWriteAccess (); nodes.putAll (map); refreshImpl (); // PENDING sometime we should also call refreshKey... } finally { PR.exitWriteAccess (); } }
/** Add a collection of new key/value pairs into the map. * The supplied map may contain any keys, but the values must be {@link Node}s. * * @param map the map with pairs to add */ protected final void putAll (final java.util.Map map) { try { PR.enterWriteAccess (); nodes.putAll (map); refreshImpl (); // PENDING sometime we should also call refreshKey... } finally { PR.exitWriteAccess (); } }
/** Add one key and one node to the list. * @param key the key * @param node the node */ protected final void put (final Object key, final Node node) { try { PR.enterWriteAccess (); if (nodes.put (key, node) != null) { refreshKeyImpl (key); } else { refreshImpl (); } } finally { PR.exitWriteAccess (); } }
public Node getManagerNode(Lookup lookup) { return new JBManagerNode(new Children.Map(), lookup); }
/** Allows subclasses that directly modifies the * map with nodes to synchronize the state of the children. * * @param key the key that should be refreshed */ protected final void refreshKey (final Object key) { try { PR.enterWriteAccess (); refreshKeyImpl (key); } finally { PR.exitWriteAccess (); } }
/** Remove a given child node from the list by its key. * @param key key to remove */ protected void remove (final Object key) { try { PR.enterWriteAccess (); if (nodes.remove (key) != null) { refreshImpl (); } } finally { PR.exitWriteAccess (); } }
public Node getManagerNode(Lookup lookup) { GSInstanceNode tn = new GSInstanceNode(new Children.Map(), lookup); return tn; }
/** Remove a given child node from the list by its key. * @param key key to remove */ protected void remove (final Object key) { try { PR.enterWriteAccess (); if (nodes.remove (key) != null) { refreshImpl (); } } finally { PR.exitWriteAccess (); } }
/** Allows subclasses that directly modifies the * map with nodes to synchronize the state of the children. * * @param key the key that should be refreshed */ protected final void refreshKey (final Object key) { try { PR.enterWriteAccess (); refreshKeyImpl (key); } finally { PR.exitWriteAccess (); } }
/** Remove some children from the list by key. * @param keys collection of keys to remove */ protected final void removeAll (final Collection keys) { try { PR.enterWriteAccess (); nodes.keySet ().removeAll (keys); refreshImpl (); } finally { PR.exitWriteAccess (); } }
/** Remove some children from the list by key. * @param keys collection of keys to remove */ protected final void removeAll (final Collection keys) { try { PR.enterWriteAccess (); nodes.keySet ().removeAll (keys); refreshImpl (); } finally { PR.exitWriteAccess (); } }
/** Allows subclasses that directly modifies the * map with nodes to synchronize the state of the children. */ protected final void refresh () { try { PR.enterWriteAccess (); refreshImpl (); } finally { PR.exitWriteAccess (); } }
/** Getter for the map. * Ensures that the map has been initialized. */ final java.util.Map getMap () { // package private only to simplify access from inner classes if (nodes == null) { nodes = initMap (); } return nodes; }
/** Allows subclasses that directly modifies the * map with nodes to synchronize the state of the children. * This method should be called under * MUTEX.writeAccess. * * @param key the key that should be refreshed */ final void refreshKeyImpl (Object key) { this.refreshEntry (new ME (key, null)); }
/** Allows subclasses that directly modifies the * map with nodes to synchronize the state of the children. * This method should be called under * MUTEX.writeAccess. * * @param key the key that should be refreshed */ final void refreshKeyImpl (Object key) { this.refreshEntry (new ME (key, null)); }
/** Allows subclasses that directly modifies the * map with nodes to synchronize the state of the children. * This method should be called under * MUTEX.writeAccess. */ final void refreshImpl () { this.setEntries (createEntries (getMap ())); }
/** * Return node representing the admin server. Children of this node are filtered. * @param lookup will contain DeploymentFactory, DeploymentManager, Management objects. * @return admin server node. */ public Node getManagerNode(Lookup lookup) { TomcatInstanceNode tn = new TomcatInstanceNode (new Children.Map(), lookup); return tn; }