Package org.hyperdex.client

Examples of org.hyperdex.client.Client


public class DataTypeInt
{
    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", 0);
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs2 = new HashMap<String, Object>();
        attrs2.put("v", 1);
        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", 1);
        get3.entrySet().containsAll(expected3.entrySet());
        expected3.entrySet().containsAll(get3.entrySet());
        Map<String, Object> attrs4 = new HashMap<String, Object>();
        attrs4.put("v", -1);
        Object obj4 = c.put("kv", "k", attrs4);
        assert(obj4 != null);
        Boolean bool4 = (Boolean)obj4;
        assert(bool4 == true);
        Map<String, Object> get5 = c.get("kv", "k");
        assert(get5 != null);
        Map<String, Object> expected5 = new HashMap<String, Object>();
        expected5.put("v", -1);
        get5.entrySet().containsAll(expected5.entrySet());
        expected5.entrySet().containsAll(get5.entrySet());
        Map<String, Object> attrs6 = new HashMap<String, Object>();
        attrs6.put("v", 0);
        Object obj6 = c.put("kv", "k", attrs6);
        assert(obj6 != null);
        Boolean bool6 = (Boolean)obj6;
        assert(bool6 == true);
        Map<String, Object> get7 = c.get("kv", "k");
        assert(get7 != null);
        Map<String, Object> expected7 = new HashMap<String, Object>();
        expected7.put("v", 0);
        get7.entrySet().containsAll(expected7.entrySet());
        expected7.entrySet().containsAll(get7.entrySet());
        Map<String, Object> attrs8 = new HashMap<String, Object>();
        attrs8.put("v", 9223372036854775807L);
        Object obj8 = c.put("kv", "k", attrs8);
        assert(obj8 != null);
        Boolean bool8 = (Boolean)obj8;
        assert(bool8 == true);
        Map<String, Object> get9 = c.get("kv", "k");
        assert(get9 != null);
        Map<String, Object> expected9 = new HashMap<String, Object>();
        expected9.put("v", 9223372036854775807L);
        get9.entrySet().containsAll(expected9.entrySet());
        expected9.entrySet().containsAll(get9.entrySet());
        Map<String, Object> attrs10 = new HashMap<String, Object>();
        attrs10.put("v", -9223372036854775808L);
        Object obj10 = c.put("kv", "k", attrs10);
        assert(obj10 != null);
        Boolean bool10 = (Boolean)obj10;
        assert(bool10 == true);
        Map<String, Object> get11 = c.get("kv", "k");
        assert(get11 != null);
        Map<String, Object> expected11 = new HashMap<String, Object>();
        expected11.put("v", -9223372036854775808L);
        get11.entrySet().containsAll(expected11.entrySet());
        expected11.entrySet().containsAll(get11.entrySet());
View Full Code Here


public class DataTypeFloat
{
    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", 0.0);
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs2 = new HashMap<String, Object>();
        attrs2.put("v", 3.14);
        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", 3.14);
        get3.entrySet().containsAll(expected3.entrySet());
        expected3.entrySet().containsAll(get3.entrySet());
View Full Code Here

public class DataTypeMapIntFloat
{
    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, 3.14);
        map4.put(2, 0.25);
        map4.put(3, 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(1, 3.14);
        map6.put(2, 0.25);
        map6.put(3, 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 DataTypeSetString
{
    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>();
        Set<Object> set2 = new HashSet<Object>();
        expected1.put("v", set2);
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        Set<Object> set4 = new HashSet<Object>();
        set4.add("A");
        set4.add("B");
        set4.add("C");
        attrs3.put("v", set4);
        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>();
        Set<Object> set6 = new HashSet<Object>();
        set6.add("A");
        set6.add("B");
        set6.add("C");
        expected5.put("v", set6);
        get5.entrySet().containsAll(expected5.entrySet());
        expected5.entrySet().containsAll(get5.entrySet());
        Map<String, Object> attrs7 = new HashMap<String, Object>();
        Set<Object> set8 = new HashSet<Object>();
        attrs7.put("v", set8);
        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>();
        Set<Object> set10 = new HashSet<Object>();
        expected9.put("v", set10);
        get9.entrySet().containsAll(expected9.entrySet());
View Full Code Here

public class DataTypeMapFloatString
{
    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, "Y");
        map4.put(1.0, "Z");
        map4.put(3.14, "X");
        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, "Y");
        map6.put(1.0, "Z");
        map6.put(3.14, "X");
        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 DataTypeMapStringInt
{
    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", 1);
        map4.put("B", 2);
        map4.put("C", 3);
        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", 1);
        map6.put("B", 2);
        map6.put("C", 3);
        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 DataTypeSetFloat
{
    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>();
        Set<Object> set2 = new HashSet<Object>();
        expected1.put("v", set2);
        get1.entrySet().containsAll(expected1.entrySet());
        expected1.entrySet().containsAll(get1.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        Set<Object> set4 = new HashSet<Object>();
        set4.add(0.25);
        set4.add(1.0);
        set4.add(3.14);
        attrs3.put("v", set4);
        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>();
        Set<Object> set6 = new HashSet<Object>();
        set6.add(0.25);
        set6.add(1.0);
        set6.add(3.14);
        expected5.put("v", set6);
        get5.entrySet().containsAll(expected5.entrySet());
        expected5.entrySet().containsAll(get5.entrySet());
        Map<String, Object> attrs7 = new HashMap<String, Object>();
        Set<Object> set8 = new HashSet<Object>();
        attrs7.put("v", set8);
        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>();
        Set<Object> set10 = new HashSet<Object>();
        expected9.put("v", set10);
        get9.entrySet().containsAll(expected9.entrySet());
View Full Code Here

public class MultiAttribute
{
    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("v1", "ABC");
        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("v1", "ABC");
        expected2.put("v2", "");
        get2.entrySet().containsAll(expected2.entrySet());
        expected2.entrySet().containsAll(get2.entrySet());
        Map<String, Object> attrs3 = new HashMap<String, Object>();
        attrs3.put("v2", "123");
        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("v1", "ABC");
        expected4.put("v2", "123");
        get4.entrySet().containsAll(expected4.entrySet());
        expected4.entrySet().containsAll(get4.entrySet());
        List<String> list6 = new ArrayList<String>();
        list6.add("v1");
        Map<String, Object> get5 = c.get_partial("kv", "k", list6);
        assert(get5 != null);
        Map<String, Object> expected5 = new HashMap<String, Object>();
        expected5.put("v1", "ABC");
        get5.entrySet().containsAll(expected5.entrySet());
        expected5.entrySet().containsAll(get5.entrySet());
View Full Code Here

public class DataTypeMapStringString
{
    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", "X");
        map4.put("B", "Y");
        map4.put("C", "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("A", "X");
        map6.put("B", "Y");
        map6.put("C", "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 DataTypeListInt
{
    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(1);
        list4.add(2);
        list4.add(3);
        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(1);
        list6.add(2);
        list6.add(3);
        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

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.