Examples of ViewId


Examples of org.jgroups.ViewId

            System.out.println();

            Map<ViewId,Integer> views=new HashMap<ViewId,Integer>();

            for(JChannel ch: channels) {
                ViewId view_id=ch.getView().getViewId();
                Integer val=views.get(view_id);
                views.put(view_id, val == null? 1 : val+1);
                int size=ch.getView().size();
                if(size != NUM)
                    merge_completed=false;
View Full Code Here

Examples of org.jgroups.ViewId

    public void testEquals() {
        assert view.equals(view);
    }

    public void testEquals2() {
        View v1=new View(new ViewId(a, 12345), new ArrayList<Address>(members));
        View v2=new View(a, 12345, new ArrayList<Address>(members));
        assert v1.equals(v2);
        View v3=new View(a, 12543, new ArrayList<Address>(members));
        assert !v1.equals(v3);
    }
View Full Code Here

Examples of org.jgroups.ViewId

                if(!response.isServer())
                    continue;
                View view=response.getView();
                if(view == null)
                    continue;
                ViewId vid=view.getVid();
                if(!containsViewId(ret, vid))
                    ret.add(view);
            }
            return ret;
        }
View Full Code Here

Examples of org.jgroups.ViewId

       


        boolean containsViewId(Collection<View> views, ViewId vid) {
            for(View view: views) {
                ViewId tmp=view.getVid();
                if(Util.sameViewId(vid, tmp))
                    return true;
            }
            return false;
        }
View Full Code Here

Examples of org.jgroups.ViewId

        public List<View> detectDifferentViews(Map<Address,View> map) {
            final List<View> ret=new ArrayList<View>();
            for(View view: map.values()) {
                if(view == null)
                    continue;
                ViewId vid=view.getVid();
                if(!Util.containsViewId(ret, vid))
                    ret.add(view);
            }
            return ret;
        }
View Full Code Here

Examples of org.rhq.coregui.client.ViewId

            }

            @Override
            public void onSuccess(PageList<BundleVersion> result) {
                BundleVersion version = result.get(0);
                ViewId nextPath = viewPath.next().getCurrent();
                viewBundleVersion(version, nextPath);
            }
        });
    }
View Full Code Here

Examples of org.rhq.coregui.client.ViewId

            });
        }
    }

    public void renderView(ViewPath viewPath) {
        ViewId currentViewId = viewPath.getCurrent();
        String currentViewIdPath = currentViewId.getPath();
        if ("AutoGroup".equals(currentViewIdPath)) {
            // Move the currentViewId to the ID portion to play better with other code
            currentViewId = viewPath.getNext();
            String autoGroupIdString = currentViewId.getPath();
            Integer autoGroupId = Integer.parseInt(autoGroupIdString);
            setSelectedAutoGroup(autoGroupId);
        } else {
            String resourceIdString = currentViewId.getPath();
            Integer resourceId = Integer.parseInt(resourceIdString);
            setSelectedResource(resourceId, viewPath.isRefresh());
        }
    }
View Full Code Here

Examples of org.sonatype.nexus.componentviews.ViewId

    final String viewName = document.field(P_VIEWNAME, OType.STRING);
    final String internalId = document.field(P_VIEWID, OType.STRING);
    final String factoryName = document.field(P_FACTORYNAME, OType.STRING);
    final Map<String, Object> config = document.field(P_CONFIGURATION, OType.EMBEDDEDMAP);
    ViewConfig entity = new ViewConfig(new ViewId(viewName, internalId), factoryName, config);

    return entity;
  }
View Full Code Here

Examples of org.sonatype.nexus.componentviews.ViewId

    return recordIdObfuscator.decode(entityType, id.toString());
  }

  @Override
  public ViewId createId(final String name) {
    return new ViewId(name, UUID.randomUUID().toString());
  }
View Full Code Here

Examples of org.sonatype.nexus.componentviews.ViewId

  private static final String PROXY_INTERNAL_ID = "bar_34wfe32434";

  @Override
  public void contributeTo(final ViewConfigStore viewConfigStore) throws IOException {

    final ViewConfig hostedViewConfig = new ViewConfig(new ViewId(VIEW_NAME, INTERNAL_ID),
        RawBinaryViewFactory.FACTORY_NAME,
        Collections.<String, Object>emptyMap());

    addIfAbsent(hostedViewConfig, viewConfigStore);

    final ViewConfig proxyViewConfig = new ViewConfig(new ViewId(PROXY_VIEW_NAME, PROXY_INTERNAL_ID),
        RawBinaryProxyViewFactory.FACTORY_NAME,
        ImmutableMap.of("sourceName", (Object) RawSourceConfigContribution.SOURCE_NAME));

    addIfAbsent(proxyViewConfig, viewConfigStore);
  }
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.