Examples of keyExists()


Examples of net.citizensnpcs.properties.Storage.keyExists()

                nodes.add(node);
            }
        }
        for (Node node : nodes) {
            local = node.getFile();
            if (!local.keyExists(node.getPath())) {
                Messaging.log("Writing default setting " + node.getPath() + ".");
                local.setRaw(node.getPath(), node.getValue());
            } else {
                node.set(local.getRaw(node.getPath()));
            }
View Full Code Here

Examples of org.jgroups.util.ExtendedUUID.keyExists()

    public void testPut() throws Exception {
        ExtendedUUID uuid=ExtendedUUID.randomUUID("A").put("name", Util.objectToByteBuffer("Bela"))
          .put("age",Util.objectToByteBuffer(49)).put("bool",Util.objectToByteBuffer(true));
        System.out.println("uuid = " + uuid);
        assert uuid.keyExists("name");
        assert uuid.keyExists("bool");
        byte[] val=uuid.get("age");
        assert Util.objectFromByteBuffer(val).equals(49);
    }
View Full Code Here

Examples of org.jgroups.util.ExtendedUUID.keyExists()

    public void testPut() throws Exception {
        ExtendedUUID uuid=ExtendedUUID.randomUUID("A").put("name", Util.objectToByteBuffer("Bela"))
          .put("age",Util.objectToByteBuffer(49)).put("bool",Util.objectToByteBuffer(true));
        System.out.println("uuid = " + uuid);
        assert uuid.keyExists("name");
        assert uuid.keyExists("bool");
        byte[] val=uuid.get("age");
        assert Util.objectFromByteBuffer(val).equals(49);
    }

    public void testAddContents() throws Exception {
View Full Code Here

Examples of org.jgroups.util.ExtendedUUID.keyExists()

        tmp=uuid.get(String.valueOf(7));
        assert tmp != null && Arrays.equals(tmp, val);

        uuid.remove(String.valueOf(7));
        assert uuid.keyExists(String.valueOf(8));
    }

    public void testResize() throws Exception {
        ExtendedUUID uuid=ExtendedUUID.randomUUID("A");
        byte[] val=Util.objectToByteBuffer("tmp");
View Full Code Here

Examples of org.jgroups.util.ExtendedUUID.keyExists()

    public void testResize() throws Exception {
        ExtendedUUID uuid=ExtendedUUID.randomUUID("A");
        byte[] val=Util.objectToByteBuffer("tmp");
        for(int i=1000; i <= 1005; i++) {
            uuid.put(String.valueOf(i), val);
            assert uuid.keyExists(String.valueOf(i));
        }
        System.out.println("uuid = " + uuid);
    }

    public void testResizeBeyond255() throws Exception {
View Full Code Here

Examples of org.jgroups.util.ExtendedUUID.keyExists()

        assert uuid.getMostSignificantBits() == uuid2.getMostSignificantBits();
        assert uuid.getLeastSignificantBits() == uuid2.getLeastSignificantBits();
        assert uuid2.isFlagSet((short)16) && uuid2.isFlagSet((short)32);
        assert uuid2.length() == 3;
        for(String key: Arrays.asList("name", "age", "bool"))
            assert uuid2.keyExists(key);
    }

    public void testMarshalling() throws Exception {
        ExtendedUUID uuid=ExtendedUUID.randomUUID("A").setFlag((short)16).setFlag((short)32);
        uuid.put("name", Util.objectToByteBuffer("Bela"))
View Full Code Here

Examples of org.jgroups.util.ExtendedUUID.keyExists()

        ExtendedUUID uuid2=(ExtendedUUID)Util.streamableFromByteBuffer(ExtendedUUID.class,buffer);
        System.out.println("uuid2 = " + uuid2);
        assert uuid2.isFlagSet((short)16);
        assert uuid2.isFlagSet((short)32);
        for(String key: Arrays.asList("name", "age", "bool"))
            assert uuid2.keyExists(key);
    }


    public void testMarshallingNullHashMap() throws Exception {
        ExtendedUUID uuid=ExtendedUUID.randomUUID("A");
View Full Code Here

Examples of org.jgroups.util.ExtendedUUID.keyExists()

        System.out.println("uuid2 = " + uuid2);
        assert uuid2.length() == 5;

        for(int i=1; i <= 10; i++) {
            boolean exists=i % 2 != 0;
            assert uuid2.keyExists(String.valueOf(i)) == exists;
        }
    }

    public void testTopologyUUID() {
        TopologyUUID u1=TopologyUUID.randomUUID("A", "london", "rack-25", "322649");
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.