Package org.hyperdex.client

Examples of org.hyperdex.client.Client


public class Basic
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> get0 = c.get("kv", "k");
        assert(get0 == null);
        Map<String, Object> attrs1 = new HashMap<String, Object>();
        attrs1.put("v", "v1");
        Object obj1 = c.put("kv", "k", attrs1);
        assert(obj1 != null);
        Boolean bool1 = (Boolean)obj1;
        assert(bool1 == true);
        Map<String, Object> get2 = c.get("kv", "k");
        assert(get2 != null);
        Map<String, Object> expected2 = new HashMap<String, Object>();
        expected2.put("v", "v1");
        get2.entrySet().containsAll(expected2.entrySet());
        expected2.entrySet().containsAll(get2.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        attrs3.put("v", "v2");
        Object obj3 = c.put("kv", "k", attrs3);
        assert(obj3 != null);
        Boolean bool3 = (Boolean)obj3;
        assert(bool3 == true);
        Map<String, Object> get4 = c.get("kv", "k");
        assert(get4 != null);
        Map<String, Object> expected4 = new HashMap<String, Object>();
        expected4.put("v", "v2");
        get4.entrySet().containsAll(expected4.entrySet());
        expected4.entrySet().containsAll(get4.entrySet());
        Map<String, Object> attrs5 = new HashMap<String, Object>();
        attrs5.put("v", "v3");
        Object obj5 = c.put("kv", "k", attrs5);
        assert(obj5 != null);
        Boolean bool5 = (Boolean)obj5;
        assert(bool5 == true);
        Map<String, Object> get6 = c.get("kv", "k");
        assert(get6 != null);
        Map<String, Object> expected6 = new HashMap<String, Object>();
        expected6.put("v", "v3");
        get6.entrySet().containsAll(expected6.entrySet());
        expected6.entrySet().containsAll(get6.entrySet());
        Object obj7 = c.del("kv", "k");
        assert(obj7 != null);
        Boolean bool7 = (Boolean)obj7;
        assert(bool7 == true);
        Map<String, Object> get8 = c.get("kv", "k");
        assert(get8 == null);
    }
View Full Code Here


public class DataTypeMapIntString
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> attrs0 = new HashMap<String, Object>();
        Object obj0 = c.put("kv", "k", attrs0);
        assert(obj0 != null);
        Boolean bool0 = (Boolean)obj0;
        assert(bool0 == true);
        Map<String, Object> get1 = c.get("kv", "k");
        assert(get1 != null);
        Map<String, Object> expected1 = new HashMap<String, Object>();
        Map<Object, Object> map2 = new HashMap<Object, Object>();
        expected1.put("v", map2);
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        Map<Object, Object> map4 = new HashMap<Object, Object>();
        map4.put(1, "X");
        map4.put(2, "Y");
        map4.put(3, "Z");
        attrs3.put("v", map4);
        Object obj3 = c.put("kv", "k", attrs3);
        assert(obj3 != null);
        Boolean bool3 = (Boolean)obj3;
        assert(bool3 == true);
        Map<String, Object> get5 = c.get("kv", "k");
        assert(get5 != null);
        Map<String, Object> expected5 = new HashMap<String, Object>();
        Map<Object, Object> map6 = new HashMap<Object, Object>();
        map6.put(1, "X");
        map6.put(2, "Y");
        map6.put(3, "Z");
        expected5.put("v", map6);
        get5.entrySet().containsAll(expected5.entrySet());
        expected5.entrySet().containsAll(get5.entrySet());
        Map<String, Object> attrs7 = new HashMap<String, Object>();
        Map<Object, Object> map8 = new HashMap<Object, Object>();
        attrs7.put("v", map8);
        Object obj7 = c.put("kv", "k", attrs7);
        assert(obj7 != null);
        Boolean bool7 = (Boolean)obj7;
        assert(bool7 == true);
        Map<String, Object> get9 = c.get("kv", "k");
        assert(get9 != null);
        Map<String, Object> expected9 = new HashMap<String, Object>();
        Map<Object, Object> map10 = new HashMap<Object, Object>();
        expected9.put("v", map10);
        get9.entrySet().containsAll(expected9.entrySet());
View Full Code Here

public class CondPut
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> get0 = c.get("kv", "k");
        assert(get0 == null);
        Map<String, Object> attrs1 = new HashMap<String, Object>();
        attrs1.put("v", "v1");
        Object obj1 = c.put("kv", "k", attrs1);
        assert(obj1 != null);
        Boolean bool1 = (Boolean)obj1;
        assert(bool1 == true);
        Map<String, Object> get2 = c.get("kv", "k");
        assert(get2 != null);
        Map<String, Object> expected2 = new HashMap<String, Object>();
        expected2.put("v", "v1");
        get2.entrySet().containsAll(expected2.entrySet());
        expected2.entrySet().containsAll(get2.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        attrs3.put("v", "v3");
        Map<String, Object> checks3 = new HashMap<String, Object>();
        checks3.put("v", "v2");
        Object obj3 = c.cond_put("kv", "k", checks3, attrs3);
        assert(obj3 != null);
        Boolean bool3 = (Boolean)obj3;
        assert(bool3 == false);
        Map<String, Object> get4 = c.get("kv", "k");
        assert(get4 != null);
        Map<String, Object> expected4 = new HashMap<String, Object>();
        expected4.put("v", "v1");
        get4.entrySet().containsAll(expected4.entrySet());
        expected4.entrySet().containsAll(get4.entrySet());
        Map<String, Object> attrs5 = new HashMap<String, Object>();
        attrs5.put("v", "v3");
        Map<String, Object> checks5 = new HashMap<String, Object>();
        checks5.put("v", "v1");
        Object obj5 = c.cond_put("kv", "k", checks5, attrs5);
        assert(obj5 != null);
        Boolean bool5 = (Boolean)obj5;
        assert(bool5 == true);
        Map<String, Object> get6 = c.get("kv", "k");
        assert(get6 != null);
        Map<String, Object> expected6 = new HashMap<String, Object>();
        expected6.put("v", "v3");
        get6.entrySet().containsAll(expected6.entrySet());
        expected6.entrySet().containsAll(get6.entrySet());
View Full Code Here

public class DataTypeString
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> attrs0 = new HashMap<String, Object>();
        Object obj0 = c.put("kv", "k", attrs0);
        assert(obj0 != null);
        Boolean bool0 = (Boolean)obj0;
        assert(bool0 == true);
        Map<String, Object> get1 = c.get("kv", "k");
        assert(get1 != null);
        Map<String, Object> expected1 = new HashMap<String, Object>();
        expected1.put("v", "");
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs2 = new HashMap<String, Object>();
        attrs2.put("v", "xxx");
        Object obj2 = c.put("kv", "k", attrs2);
        assert(obj2 != null);
        Boolean bool2 = (Boolean)obj2;
        assert(bool2 == true);
        Map<String, Object> get3 = c.get("kv", "k");
        assert(get3 != null);
        Map<String, Object> expected3 = new HashMap<String, Object>();
        expected3.put("v", "xxx");
        get3.entrySet().containsAll(expected3.entrySet());
        expected3.entrySet().containsAll(get3.entrySet());
        Map<String, Object> attrs4 = new HashMap<String, Object>();
        byte[] bytes5 = {(byte) 0xde, (byte) 0xad, (byte) 0xbe, (byte) 0xef};
        attrs4.put("v", new ByteString(bytes5));
        Object obj4 = c.put("kv", "k", attrs4);
        assert(obj4 != null);
        Boolean bool4 = (Boolean)obj4;
        assert(bool4 == true);
        Map<String, Object> get6 = c.get("kv", "k");
        assert(get6 != null);
        Map<String, Object> expected6 = new HashMap<String, Object>();
        byte[] bytes7 = {(byte) 0xde, (byte) 0xad, (byte) 0xbe, (byte) 0xef};
        expected6.put("v", new ByteString(bytes7));
        get6.entrySet().containsAll(expected6.entrySet());
View Full Code Here

public class LengthString
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> attrs0 = new HashMap<String, Object>();
        Object obj0 = c.put("kv", "A", attrs0);
        assert(obj0 != null);
        Boolean bool0 = (Boolean)obj0;
        assert(bool0 == true);
        Map<String, Object> attrs1 = new HashMap<String, Object>();
        Object obj1 = c.put("kv", "AB", attrs1);
        assert(obj1 != null);
        Boolean bool1 = (Boolean)obj1;
        assert(bool1 == true);
        Map<String, Object> attrs2 = new HashMap<String, Object>();
        Object obj2 = c.put("kv", "ABC", attrs2);
        assert(obj2 != null);
        Boolean bool2 = (Boolean)obj2;
        assert(bool2 == true);
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        Object obj3 = c.put("kv", "ABCD", attrs3);
        assert(obj3 != null);
        Boolean bool3 = (Boolean)obj3;
        assert(bool3 == true);
        Map<String, Object> attrs4 = new HashMap<String, Object>();
        Object obj4 = c.put("kv", "ABCDE", attrs4);
        assert(obj4 != null);
        Boolean bool4 = (Boolean)obj4;
        assert(bool4 == true);
        Map<String, Object> checks5 = new HashMap<String, Object>();
        checks5.put("k", new LengthEquals(1));
        Set<Object> X5 = new HashSet<Object>();
        Iterator it5 = c.search("kv", checks5);
        while (it5.hasNext())
        {
            X5.add(it5.next());
        }
        Map<String, Object> checks6 = new HashMap<String, Object>();
        checks6.put("k", new LengthEquals(2));
        Set<Object> X6 = new HashSet<Object>();
        Iterator it6 = c.search("kv", checks6);
        while (it6.hasNext())
        {
            X6.add(it6.next());
        }
        Map<String, Object> checks7 = new HashMap<String, Object>();
        checks7.put("k", new LengthEquals(3));
        Set<Object> X7 = new HashSet<Object>();
        Iterator it7 = c.search("kv", checks7);
        while (it7.hasNext())
        {
            X7.add(it7.next());
        }
        Map<String, Object> checks8 = new HashMap<String, Object>();
        checks8.put("k", new LengthEquals(4));
        Set<Object> X8 = new HashSet<Object>();
        Iterator it8 = c.search("kv", checks8);
        while (it8.hasNext())
        {
            X8.add(it8.next());
        }
        Map<String, Object> checks9 = new HashMap<String, Object>();
        checks9.put("k", new LengthEquals(5));
        Set<Object> X9 = new HashSet<Object>();
        Iterator it9 = c.search("kv", checks9);
        while (it9.hasNext())
        {
            X9.add(it9.next());
        }
        Map<String, Object> checks10 = new HashMap<String, Object>();
        checks10.put("k", new LengthLessEqual(3));
        Set<Object> X10 = new HashSet<Object>();
        Iterator it10 = c.search("kv", checks10);
        while (it10.hasNext())
        {
            X10.add(it10.next());
        }
        Map<String, Object> checks11 = new HashMap<String, Object>();
        checks11.put("k", new LengthGreaterEqual(3));
        Set<Object> X11 = new HashSet<Object>();
        Iterator it11 = c.search("kv", checks11);
        while (it11.hasNext())
        {
            X11.add(it11.next());
        }
    }
View Full Code Here

public class DataTypeListFloat
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> attrs0 = new HashMap<String, Object>();
        Object obj0 = c.put("kv", "k", attrs0);
        assert(obj0 != null);
        Boolean bool0 = (Boolean)obj0;
        assert(bool0 == true);
        Map<String, Object> get1 = c.get("kv", "k");
        assert(get1 != null);
        Map<String, Object> expected1 = new HashMap<String, Object>();
        List<Object> list2 = new ArrayList<Object>();
        expected1.put("v", list2);
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        List<Object> list4 = new ArrayList<Object>();
        list4.add(3.14);
        list4.add(0.25);
        list4.add(1.0);
        attrs3.put("v", list4);
        Object obj3 = c.put("kv", "k", attrs3);
        assert(obj3 != null);
        Boolean bool3 = (Boolean)obj3;
        assert(bool3 == true);
        Map<String, Object> get5 = c.get("kv", "k");
        assert(get5 != null);
        Map<String, Object> expected5 = new HashMap<String, Object>();
        List<Object> list6 = new ArrayList<Object>();
        list6.add(3.14);
        list6.add(0.25);
        list6.add(1.0);
        expected5.put("v", list6);
        get5.entrySet().containsAll(expected5.entrySet());
        expected5.entrySet().containsAll(get5.entrySet());
        Map<String, Object> attrs7 = new HashMap<String, Object>();
        List<Object> list8 = new ArrayList<Object>();
        attrs7.put("v", list8);
        Object obj7 = c.put("kv", "k", attrs7);
        assert(obj7 != null);
        Boolean bool7 = (Boolean)obj7;
        assert(bool7 == true);
        Map<String, Object> get9 = c.get("kv", "k");
        assert(get9 != null);
        Map<String, Object> expected9 = new HashMap<String, Object>();
        List<Object> list10 = new ArrayList<Object>();
        expected9.put("v", list10);
        get9.entrySet().containsAll(expected9.entrySet());
View Full Code Here

public class DataTypeMapStringFloat
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> attrs0 = new HashMap<String, Object>();
        Object obj0 = c.put("kv", "k", attrs0);
        assert(obj0 != null);
        Boolean bool0 = (Boolean)obj0;
        assert(bool0 == true);
        Map<String, Object> get1 = c.get("kv", "k");
        assert(get1 != null);
        Map<String, Object> expected1 = new HashMap<String, Object>();
        Map<Object, Object> map2 = new HashMap<Object, Object>();
        expected1.put("v", map2);
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        Map<Object, Object> map4 = new HashMap<Object, Object>();
        map4.put("A", 3.14);
        map4.put("B", 0.25);
        map4.put("C", 1.0);
        attrs3.put("v", map4);
        Object obj3 = c.put("kv", "k", attrs3);
        assert(obj3 != null);
        Boolean bool3 = (Boolean)obj3;
        assert(bool3 == true);
        Map<String, Object> get5 = c.get("kv", "k");
        assert(get5 != null);
        Map<String, Object> expected5 = new HashMap<String, Object>();
        Map<Object, Object> map6 = new HashMap<Object, Object>();
        map6.put("A", 3.14);
        map6.put("B", 0.25);
        map6.put("C", 1.0);
        expected5.put("v", map6);
        get5.entrySet().containsAll(expected5.entrySet());
        expected5.entrySet().containsAll(get5.entrySet());
        Map<String, Object> attrs7 = new HashMap<String, Object>();
        Map<Object, Object> map8 = new HashMap<Object, Object>();
        attrs7.put("v", map8);
        Object obj7 = c.put("kv", "k", attrs7);
        assert(obj7 != null);
        Boolean bool7 = (Boolean)obj7;
        assert(bool7 == true);
        Map<String, Object> get9 = c.get("kv", "k");
        assert(get9 != null);
        Map<String, Object> expected9 = new HashMap<String, Object>();
        Map<Object, Object> map10 = new HashMap<Object, Object>();
        expected9.put("v", map10);
        get9.entrySet().containsAll(expected9.entrySet());
View Full Code Here

public class DataTypeMapFloatFloat
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> attrs0 = new HashMap<String, Object>();
        Object obj0 = c.put("kv", "k", attrs0);
        assert(obj0 != null);
        Boolean bool0 = (Boolean)obj0;
        assert(bool0 == true);
        Map<String, Object> get1 = c.get("kv", "k");
        assert(get1 != null);
        Map<String, Object> expected1 = new HashMap<String, Object>();
        Map<Object, Object> map2 = new HashMap<Object, Object>();
        expected1.put("v", map2);
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        Map<Object, Object> map4 = new HashMap<Object, Object>();
        map4.put(0.25, 2.0);
        map4.put(1.0, 3.0);
        map4.put(3.14, 1.0);
        attrs3.put("v", map4);
        Object obj3 = c.put("kv", "k", attrs3);
        assert(obj3 != null);
        Boolean bool3 = (Boolean)obj3;
        assert(bool3 == true);
        Map<String, Object> get5 = c.get("kv", "k");
        assert(get5 != null);
        Map<String, Object> expected5 = new HashMap<String, Object>();
        Map<Object, Object> map6 = new HashMap<Object, Object>();
        map6.put(0.25, 2.0);
        map6.put(1.0, 3.0);
        map6.put(3.14, 1.0);
        expected5.put("v", map6);
        get5.entrySet().containsAll(expected5.entrySet());
        expected5.entrySet().containsAll(get5.entrySet());
        Map<String, Object> attrs7 = new HashMap<String, Object>();
        Map<Object, Object> map8 = new HashMap<Object, Object>();
        attrs7.put("v", map8);
        Object obj7 = c.put("kv", "k", attrs7);
        assert(obj7 != null);
        Boolean bool7 = (Boolean)obj7;
        assert(bool7 == true);
        Map<String, Object> get9 = c.get("kv", "k");
        assert(get9 != null);
        Map<String, Object> expected9 = new HashMap<String, Object>();
        Map<Object, Object> map10 = new HashMap<Object, Object>();
        expected9.put("v", map10);
        get9.entrySet().containsAll(expected9.entrySet());
View Full Code Here

public class RegexSearch
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> attrs0 = new HashMap<String, Object>();
        Object obj0 = c.put("kv", "foo/foo/foo", attrs0);
        assert(obj0 != null);
        Boolean bool0 = (Boolean)obj0;
        assert(bool0 == true);
        Map<String, Object> attrs1 = new HashMap<String, Object>();
        Object obj1 = c.put("kv", "foo/foo/bar", attrs1);
        assert(obj1 != null);
        Boolean bool1 = (Boolean)obj1;
        assert(bool1 == true);
        Map<String, Object> attrs2 = new HashMap<String, Object>();
        Object obj2 = c.put("kv", "foo/foo/baz", attrs2);
        assert(obj2 != null);
        Boolean bool2 = (Boolean)obj2;
        assert(bool2 == true);
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        Object obj3 = c.put("kv", "foo/bar/foo", attrs3);
        assert(obj3 != null);
        Boolean bool3 = (Boolean)obj3;
        assert(bool3 == true);
        Map<String, Object> attrs4 = new HashMap<String, Object>();
        Object obj4 = c.put("kv", "foo/bar/bar", attrs4);
        assert(obj4 != null);
        Boolean bool4 = (Boolean)obj4;
        assert(bool4 == true);
        Map<String, Object> attrs5 = new HashMap<String, Object>();
        Object obj5 = c.put("kv", "foo/bar/baz", attrs5);
        assert(obj5 != null);
        Boolean bool5 = (Boolean)obj5;
        assert(bool5 == true);
        Map<String, Object> attrs6 = new HashMap<String, Object>();
        Object obj6 = c.put("kv", "foo/baz/foo", attrs6);
        assert(obj6 != null);
        Boolean bool6 = (Boolean)obj6;
        assert(bool6 == true);
        Map<String, Object> attrs7 = new HashMap<String, Object>();
        Object obj7 = c.put("kv", "foo/baz/bar", attrs7);
        assert(obj7 != null);
        Boolean bool7 = (Boolean)obj7;
        assert(bool7 == true);
        Map<String, Object> attrs8 = new HashMap<String, Object>();
        Object obj8 = c.put("kv", "foo/baz/baz", attrs8);
        assert(obj8 != null);
        Boolean bool8 = (Boolean)obj8;
        assert(bool8 == true);
        Map<String, Object> attrs9 = new HashMap<String, Object>();
        Object obj9 = c.put("kv", "bar/foo/foo", attrs9);
        assert(obj9 != null);
        Boolean bool9 = (Boolean)obj9;
        assert(bool9 == true);
        Map<String, Object> attrs10 = new HashMap<String, Object>();
        Object obj10 = c.put("kv", "bar/foo/bar", attrs10);
        assert(obj10 != null);
        Boolean bool10 = (Boolean)obj10;
        assert(bool10 == true);
        Map<String, Object> attrs11 = new HashMap<String, Object>();
        Object obj11 = c.put("kv", "bar/foo/baz", attrs11);
        assert(obj11 != null);
        Boolean bool11 = (Boolean)obj11;
        assert(bool11 == true);
        Map<String, Object> attrs12 = new HashMap<String, Object>();
        Object obj12 = c.put("kv", "bar/bar/foo", attrs12);
        assert(obj12 != null);
        Boolean bool12 = (Boolean)obj12;
        assert(bool12 == true);
        Map<String, Object> attrs13 = new HashMap<String, Object>();
        Object obj13 = c.put("kv", "bar/bar/bar", attrs13);
        assert(obj13 != null);
        Boolean bool13 = (Boolean)obj13;
        assert(bool13 == true);
        Map<String, Object> attrs14 = new HashMap<String, Object>();
        Object obj14 = c.put("kv", "bar/bar/baz", attrs14);
        assert(obj14 != null);
        Boolean bool14 = (Boolean)obj14;
        assert(bool14 == true);
        Map<String, Object> attrs15 = new HashMap<String, Object>();
        Object obj15 = c.put("kv", "bar/baz/foo", attrs15);
        assert(obj15 != null);
        Boolean bool15 = (Boolean)obj15;
        assert(bool15 == true);
        Map<String, Object> attrs16 = new HashMap<String, Object>();
        Object obj16 = c.put("kv", "bar/baz/bar", attrs16);
        assert(obj16 != null);
        Boolean bool16 = (Boolean)obj16;
        assert(bool16 == true);
        Map<String, Object> attrs17 = new HashMap<String, Object>();
        Object obj17 = c.put("kv", "bar/baz/baz", attrs17);
        assert(obj17 != null);
        Boolean bool17 = (Boolean)obj17;
        assert(bool17 == true);
        Map<String, Object> attrs18 = new HashMap<String, Object>();
        Object obj18 = c.put("kv", "baz/foo/foo", attrs18);
        assert(obj18 != null);
        Boolean bool18 = (Boolean)obj18;
        assert(bool18 == true);
        Map<String, Object> attrs19 = new HashMap<String, Object>();
        Object obj19 = c.put("kv", "baz/foo/bar", attrs19);
        assert(obj19 != null);
        Boolean bool19 = (Boolean)obj19;
        assert(bool19 == true);
        Map<String, Object> attrs20 = new HashMap<String, Object>();
        Object obj20 = c.put("kv", "baz/foo/baz", attrs20);
        assert(obj20 != null);
        Boolean bool20 = (Boolean)obj20;
        assert(bool20 == true);
        Map<String, Object> attrs21 = new HashMap<String, Object>();
        Object obj21 = c.put("kv", "baz/bar/foo", attrs21);
        assert(obj21 != null);
        Boolean bool21 = (Boolean)obj21;
        assert(bool21 == true);
        Map<String, Object> attrs22 = new HashMap<String, Object>();
        Object obj22 = c.put("kv", "baz/bar/bar", attrs22);
        assert(obj22 != null);
        Boolean bool22 = (Boolean)obj22;
        assert(bool22 == true);
        Map<String, Object> attrs23 = new HashMap<String, Object>();
        Object obj23 = c.put("kv", "baz/bar/baz", attrs23);
        assert(obj23 != null);
        Boolean bool23 = (Boolean)obj23;
        assert(bool23 == true);
        Map<String, Object> attrs24 = new HashMap<String, Object>();
        Object obj24 = c.put("kv", "baz/baz/foo", attrs24);
        assert(obj24 != null);
        Boolean bool24 = (Boolean)obj24;
        assert(bool24 == true);
        Map<String, Object> attrs25 = new HashMap<String, Object>();
        Object obj25 = c.put("kv", "baz/baz/bar", attrs25);
        assert(obj25 != null);
        Boolean bool25 = (Boolean)obj25;
        assert(bool25 == true);
        Map<String, Object> attrs26 = new HashMap<String, Object>();
        Object obj26 = c.put("kv", "baz/baz/baz", attrs26);
        assert(obj26 != null);
        Boolean bool26 = (Boolean)obj26;
        assert(bool26 == true);
        Map<String, Object> checks27 = new HashMap<String, Object>();
        checks27.put("k", new Regex("^foo"));
        Set<Object> X27 = new HashSet<Object>();
        Iterator it27 = c.search("kv", checks27);
        while (it27.hasNext())
        {
            X27.add(it27.next());
        }
        Map<String, Object> checks28 = new HashMap<String, Object>();
        checks28.put("k", new Regex("foo$"));
        Set<Object> X28 = new HashSet<Object>();
        Iterator it28 = c.search("kv", checks28);
        while (it28.hasNext())
        {
            X28.add(it28.next());
        }
        Map<String, Object> checks29 = new HashMap<String, Object>();
        checks29.put("k", new Regex("^b.*/foo/.*$"));
        Set<Object> X29 = new HashSet<Object>();
        Iterator it29 = c.search("kv", checks29);
        while (it29.hasNext())
        {
            X29.add(it29.next());
        }
    }
View Full Code Here

public class DataTypeMapFloatInt
{
    public static void main(String[] args) throws HyperDexClientException
    {
        Client c = new Client(args[0], Integer.parseInt(args[1]));
        Map<String, Object> attrs0 = new HashMap<String, Object>();
        Object obj0 = c.put("kv", "k", attrs0);
        assert(obj0 != null);
        Boolean bool0 = (Boolean)obj0;
        assert(bool0 == true);
        Map<String, Object> get1 = c.get("kv", "k");
        assert(get1 != null);
        Map<String, Object> expected1 = new HashMap<String, Object>();
        Map<Object, Object> map2 = new HashMap<Object, Object>();
        expected1.put("v", map2);
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        Map<Object, Object> map4 = new HashMap<Object, Object>();
        map4.put(0.25, 2);
        map4.put(1.0, 3);
        map4.put(3.14, 1);
        attrs3.put("v", map4);
        Object obj3 = c.put("kv", "k", attrs3);
        assert(obj3 != null);
        Boolean bool3 = (Boolean)obj3;
        assert(bool3 == true);
        Map<String, Object> get5 = c.get("kv", "k");
        assert(get5 != null);
        Map<String, Object> expected5 = new HashMap<String, Object>();
        Map<Object, Object> map6 = new HashMap<Object, Object>();
        map6.put(0.25, 2);
        map6.put(1.0, 3);
        map6.put(3.14, 1);
        expected5.put("v", map6);
        get5.entrySet().containsAll(expected5.entrySet());
        expected5.entrySet().containsAll(get5.entrySet());
        Map<String, Object> attrs7 = new HashMap<String, Object>();
        Map<Object, Object> map8 = new HashMap<Object, Object>();
        attrs7.put("v", map8);
        Object obj7 = c.put("kv", "k", attrs7);
        assert(obj7 != null);
        Boolean bool7 = (Boolean)obj7;
        assert(bool7 == true);
        Map<String, Object> get9 = c.get("kv", "k");
        assert(get9 != null);
        Map<String, Object> expected9 = new HashMap<String, Object>();
        Map<Object, Object> map10 = new HashMap<Object, Object>();
        expected9.put("v", map10);
        get9.entrySet().containsAll(expected9.entrySet());
View Full Code Here

TOP

Related Classes of org.hyperdex.client.Client

Copyright © 2018 www.massapicom. 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.