Examples of VMID


Examples of java.rmi.dgc.VMID

            ThreadContext.exit(oldCallContext);
        }
    }

    protected Object newPrimaryKey() {
        return new VMID();
    }
View Full Code Here

Examples of org.jboss.util.id.VMID

    public void testVMID() throws Exception
    {
        HashSet repositoryIDs = new HashSet();
        System.out.println();
        System.out.println("---------------------- testProveVMIDHashCodeIsSame");
        VMID guid = null;
        Method method = VMID.class.getDeclaredMethod("create", new Class[]{});
        method.setAccessible(true);
        for (int i = 0; i < ITERATIONS; i++)
        {
            guid = (VMID) method.invoke(null, new Object[]{});

            Integer hashKey = new Integer(guid.hashCode());

            if (!repositoryIDs.contains(hashKey))
            {
                repositoryIDs.add(hashKey);
            }
            System.out.println("guid.hashCode()=" + guid.hashCode());
        }

        if (repositoryIDs.size()==1)
        {
            fail("HashCode is always returning the same hash");
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.