Examples of NodeEvent


Examples of org.gephi.graph.dhns.event.NodeEvent

                dhns.getGraphStructure().removeFromDictionnary(node);


                treeStructure.deleteOnlySelf(node);
                dhns.getEventManager().fireEvent(new NodeEvent(EventType.REMOVE_NODES, node, view));
            }

            for (AbstractNode node : nodesToKeep) {
                node.size = 0;
                node.parent = treeStructure.root;
View Full Code Here

Examples of org.jboss.cache.notifications.event.NodeEvent

   @NodeActivated
   @NodePassivated
   @ViewChanged
   public void broadcast(Event e)
   {
      NodeEvent ne;
      Notification n = null;
      switch (e.getType())
      {
         case CACHE_STARTED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STARTED, broadcaster, seq(), MSG_CACHE_STARTED);
            n.setUserData(serviceName);
            break;
         case CACHE_STOPPED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STOPPED, broadcaster, seq(), MSG_CACHE_STOPPED);
            n.setUserData(serviceName);
            break;
         case NODE_CREATED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_CREATED, broadcaster, seq(), MSG_NODE_CREATED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_EVICTED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_EVICTED, broadcaster, seq(), MSG_NODE_EVICTED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_LOADED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_LOADED, broadcaster, seq(), MSG_NODE_LOADED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case NODE_MODIFIED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_MODIFIED, broadcaster, seq(), MSG_NODE_MODIFIED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_REMOVED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_REMOVED, broadcaster, seq(), MSG_NODE_REMOVED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_MOVED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_MOVED, broadcaster, seq(), MSG_NODE_MOVED);
            NodeMovedEvent nme = (NodeMovedEvent) e;
            n.setUserData(new Object[]{nme.getFqn().toString(), nme.getTargetFqn().toString(), e.isPre()});
            break;
         case NODE_VISITED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_VISITED, broadcaster, seq(), MSG_NODE_VISITED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case NODE_ACTIVATED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_ACTIVATED, broadcaster, seq(), MSG_NODE_ACTIVATED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case NODE_PASSIVATED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_PASSIVATED, broadcaster, seq(), MSG_NODE_PASSIVATED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case VIEW_CHANGED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_VIEW_CHANGED, broadcaster, seq(), MSG_VIEW_CHANGED);
            n.setUserData(((ViewChangedEvent) e).getNewView().toString());
            break;
View Full Code Here

Examples of org.jboss.cache.notifications.event.NodeEvent

      break;
    case CACHE_STOPPED:
      debugCache("Cache stopped");
      break;
    case NODE_CREATED:
      NodeEvent event = (NodeEvent) e;
      debugCache("Created node " + event.getFqn());
      break;
    case NODE_MODIFIED:
      NodeEvent event1 = (NodeEvent) e;
      debugCache("Modified node " + event1.getFqn());;
      break;
    case NODE_REMOVED:
      NodeEvent event2 = (NodeEvent) e;
      debugCache("Removed node " + event2.getFqn());
      break;
    case NODE_EVICTED:
      NodeEvent event3 = (NodeEvent) e;
      debugCache("Evicted node " + event3.getFqn());
      break;
    case VIEW_CHANGED:
      ViewChangedEvent event4 = (ViewChangedEvent) e;
      debugCache("View changed " + event4.getNewView().getMembers());
      break;
View Full Code Here

Examples of org.jboss.cache.notifications.event.NodeEvent

   @NodeActivated
   @NodePassivated
   @ViewChanged
   public void broadcast(Event e)
   {
      NodeEvent ne;
      Notification n = null;
      switch (e.getType())
      {
         case CACHE_STARTED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STARTED, broadcaster, seq(), MSG_CACHE_STARTED);
            n.setUserData(serviceName);
            break;
         case CACHE_STOPPED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STOPPED, broadcaster, seq(), MSG_CACHE_STOPPED);
            n.setUserData(serviceName);
            break;
         case NODE_CREATED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_CREATED, broadcaster, seq(), MSG_NODE_CREATED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_EVICTED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_EVICTED, broadcaster, seq(), MSG_NODE_EVICTED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_LOADED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_LOADED, broadcaster, seq(), MSG_NODE_LOADED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case NODE_MODIFIED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_MODIFIED, broadcaster, seq(), MSG_NODE_MODIFIED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_REMOVED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_REMOVED, broadcaster, seq(), MSG_NODE_REMOVED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_MOVED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_MOVED, broadcaster, seq(), MSG_NODE_MOVED);
            NodeMovedEvent nme = (NodeMovedEvent) e;
            n.setUserData(new Object[]{nme.getFqn().toString(), nme.getTargetFqn().toString(), e.isPre()});
            break;
         case NODE_VISITED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_VISITED, broadcaster, seq(), MSG_NODE_VISITED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case NODE_ACTIVATED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_ACTIVATED, broadcaster, seq(), MSG_NODE_ACTIVATED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case NODE_PASSIVATED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_PASSIVATED, broadcaster, seq(), MSG_NODE_PASSIVATED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case VIEW_CHANGED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_VIEW_CHANGED, broadcaster, seq(), MSG_VIEW_CHANGED);
            n.setUserData(((ViewChangedEvent) e).getNewView().toString());
            break;
View Full Code Here

Examples of org.jboss.cache.notifications.event.NodeEvent

   @NodeActivated
   @NodePassivated
   @ViewChanged
   public void broadcast(Event e)
   {
      NodeEvent ne;
      Notification n = null;
      switch (e.getType())
      {
         case CACHE_STARTED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STARTED, broadcaster, seq(), MSG_CACHE_STARTED);
            n.setUserData(serviceName);
            break;
         case CACHE_STOPPED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_CACHE_STOPPED, broadcaster, seq(), MSG_CACHE_STOPPED);
            n.setUserData(serviceName);
            break;
         case NODE_CREATED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_CREATED, broadcaster, seq(), MSG_NODE_CREATED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_EVICTED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_EVICTED, broadcaster, seq(), MSG_NODE_EVICTED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_LOADED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_LOADED, broadcaster, seq(), MSG_NODE_LOADED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case NODE_MODIFIED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_MODIFIED, broadcaster, seq(), MSG_NODE_MODIFIED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_REMOVED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_REMOVED, broadcaster, seq(), MSG_NODE_REMOVED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre(), ne.isOriginLocal()});
            break;
         case NODE_MOVED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_MOVED, broadcaster, seq(), MSG_NODE_MOVED);
            NodeMovedEvent nme = (NodeMovedEvent) e;
            n.setUserData(new Object[]{nme.getFqn().toString(), nme.getTargetFqn().toString(), e.isPre()});
            break;
         case NODE_VISITED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_VISITED, broadcaster, seq(), MSG_NODE_VISITED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case NODE_ACTIVATED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_ACTIVATED, broadcaster, seq(), MSG_NODE_ACTIVATED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case NODE_PASSIVATED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_NODE_PASSIVATED, broadcaster, seq(), MSG_NODE_PASSIVATED);
            ne = (NodeEvent) e;
            n.setUserData(new Object[]{ne.getFqn().toString(), e.isPre()});
            break;
         case VIEW_CHANGED:
            n = new Notification(CacheNotificationBroadcaster.NOTIF_VIEW_CHANGED, broadcaster, seq(), MSG_VIEW_CHANGED);
            n.setUserData(((ViewChangedEvent) e).getNewView().toString());
            break;
View Full Code Here

Examples of org.yaml.snakeyaml.events.NodeEvent

                while (iter1.hasNext()) {
                    Event event = iter1.next();
                    Event newEvent = iter2.next();
                    assertEquals(event.getClass().getName(), newEvent.getClass().getName());
                    if (event instanceof NodeEvent) {
                        NodeEvent e1 = (NodeEvent) event;
                        NodeEvent e2 = (NodeEvent) newEvent;
                        assertEquals(e1.getAnchor(), e2.getAnchor());
                    }
                    if (event instanceof CollectionStartEvent) {
                        CollectionStartEvent e1 = (CollectionStartEvent) event;
                        CollectionStartEvent e2 = (CollectionStartEvent) newEvent;
                        assertEquals(e1.getTag(), e2.getTag());
                    }
                    if (event instanceof ScalarEvent) {
                        ScalarEvent e1 = (ScalarEvent) event;
                        ScalarEvent e2 = (ScalarEvent) newEvent;
                        if (e1.getImplicit().bothFalse() && e2.getImplicit().bothFalse()) {
                            assertEquals(e1.getTag(), e2.getTag());
                        }
                        assertEquals(e1.getValue(), e2.getValue());
                    }
                }
            } catch (Exception e) {
                System.out.println("Failed File: " + file);
                // fail("Failed File: " + file + "; " + e.getMessage());
View Full Code Here

Examples of org.yaml.snakeyaml.events.NodeEvent

                while (iter1.hasNext()) {
                    Event event = iter1.next();
                    Event newEvent = iter2.next();
                    assertEquals(event.getClass().getName(), newEvent.getClass().getName());
                    if (event instanceof NodeEvent) {
                        NodeEvent e1 = (NodeEvent) event;
                        NodeEvent e2 = (NodeEvent) newEvent;
                        assertEquals(e1.getAnchor(), e2.getAnchor());
                    }
                    if (event instanceof CollectionStartEvent) {
                        CollectionStartEvent e1 = (CollectionStartEvent) event;
                        CollectionStartEvent e2 = (CollectionStartEvent) newEvent;
                        assertEquals(e1.getTag(), e2.getTag());
                    }
                    if (event instanceof ScalarEvent) {
                        ScalarEvent e1 = (ScalarEvent) event;
                        ScalarEvent e2 = (ScalarEvent) newEvent;
                        if (e1.getImplicit().canOmitTagInPlainScalar() == e2.getImplicit()
                                .canOmitTagInPlainScalar()
                                && e1.getImplicit().canOmitTagInNonPlainScalar() == e2
                                        .getImplicit().canOmitTagInNonPlainScalar()) {

                        } else {
                            if ((e1.getTag() == null || e2.getTag() == null)
                                    || e1.getTag().equals(e2.getTag())) {
                            } else {
                                System.out.println("tag1: " + e1.getTag());
                                System.out.println("tag2: " + e2.getTag());
                                fail("in file: " + file);
                            }
                        }
                        assertEquals(e1.getValue(), e2.getValue());
                    }
                }
            } catch (Exception e) {
                System.out.println("Failed File: " + file);
                // fail("Failed File: " + file + "; " + e.getMessage());
View Full Code Here

Examples of org.yaml.snakeyaml.events.NodeEvent

            if (recursiveNodes.remove(result)) {
                result.setTwoStepsConstruction(true);
            }
            return result;
        }
        NodeEvent event = (NodeEvent) parser.peekEvent();
        String anchor = null;
        anchor = event.getAnchor();
        if (anchor != null && anchors.containsKey(anchor)) {
            throw new ComposerException("found duplicate anchor " + anchor + "; first occurence",
                    this.anchors.get(anchor).getStartMark(), "second occurence",
                    event.getStartMark());
        }
        Node node = null;
        if (parser.checkEvent(Event.ID.Scalar)) {
            node = composeScalarNode(anchor);
        } else if (parser.checkEvent(Event.ID.SequenceStart)) {
View Full Code Here

Examples of org.yaml.snakeyaml.events.NodeEvent

    }

    // Anchor, Tag, and Scalar processors.

    private void processAnchor(String indicator) throws IOException {
        NodeEvent ev = (NodeEvent) event;
        if (ev.getAnchor() == null) {
            preparedAnchor = null;
            return;
        }
        if (preparedAnchor == null) {
            preparedAnchor = prepareAnchor(ev.getAnchor());
        }
        writeIndicator(indicator + preparedAnchor, true, false, false);
        preparedAnchor = null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.