Package org.gridkit.coherence.utils.pof

Examples of org.gridkit.coherence.utils.pof.ReflectionPofExtractor


        CacheFactory.getCluster().shutdown();
    }
   
    @Test
    public void testFilter_1() {
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("a");
       
        int size = cache.keySet(new EqualsFilter(extracter, "0")).size();
       
        Assert.assertEquals(SCALE * SCALE * SCALE, size);
    }   
View Full Code Here


        Assert.assertEquals(SCALE * SCALE * SCALE, size);
    }   

    @Test
    public void testFilter_2() {
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("tuple.a");
       
        int size = cache.keySet(new EqualsFilter(extracter, '0')).size();
       
        Assert.assertEquals(SCALE * SCALE * SCALE, size);
    }   
View Full Code Here

        Assert.assertEquals(SCALE * SCALE * SCALE, size);
    }   

    @Test
    public void testIndex_1() {
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("a");
       
        cache.addIndex(extracter, false, null);

        int size = cache.keySet(new EqualsFilter(extracter, "0")).size();
       
View Full Code Here

        Assert.assertEquals(SCALE * SCALE * SCALE, size);
    }   

    @Test
    public void testIndex_2() {
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("tuple.a");
       
        cache.addIndex(extracter, false, null);
       
        int size = cache.keySet(new EqualsFilter(extracter, '0')).size();
       
View Full Code Here

        TypeB b = new TypeB();
        b.string = "ABC";
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
       
        ReflectionPofExtractor extracter1 = new ReflectionPofExtractor("string");
        Assert.assertEquals("ABC", extracter1.extractFromBinary(ctx, blob));       
    }
View Full Code Here

        TypeB b = new TypeB();
        b.string = "ABC";
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
       
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("string.count");
       
        Assert.assertEquals(3, extracter.extractFromBinary(ctx, blob));       
    }
View Full Code Here

        TypeB b = new TypeB();
        b.string = null;
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
       
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("string");
       
        Assert.assertEquals(null, extracter.extractFromBinary(ctx, blob));       
    }
View Full Code Here

        TypeB b = new TypeB();
        b.tu = TimeUnit.MILLISECONDS;
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
       
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("tu");
       
        Assert.assertEquals(TimeUnit.MILLISECONDS, extracter.extractFromBinary(ctx, blob));       
    }
View Full Code Here

        TypeB b = new TypeB();
        b.tu = null;
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
       
        ReflectionPofExtractor extracter = new ReflectionPofExtractor("tu");
       
        Assert.assertEquals(null, extracter.extractFromBinary(ctx, blob));       
    }
View Full Code Here

        TypeB b = new TypeB();
        b.stringArray = new String[]{"A","B","C"};
       
        Binary blob = ExternalizableHelper.toBinary(b, ctx);
       
        ReflectionPofExtractor extracter;
        extracter = new ReflectionPofExtractor("stringArray");       
        Assert.assertArrayEquals(new String[]{"A","B","C"}, (String[])extracter.extractFromBinary(ctx, blob));       

        extracter = new ReflectionPofExtractor("stringArray.length");       
        Assert.assertEquals(3, extracter.extractFromBinary(ctx, blob));       
    }
View Full Code Here

TOP

Related Classes of org.gridkit.coherence.utils.pof.ReflectionPofExtractor

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.