Package com.basho.riak.client.api.cap

Examples of com.basho.riak.client.api.cap.VClock


      } else if (option == Option.BASIC_QUORUM)
      {
        builder.withBasicQuorum((Boolean) opPair.getValue());
      } else if (option == Option.IF_MODIFIED)
      {
        VClock clock = (VClock) opPair.getValue();
        builder.withIfNotModified(clock.getBytes());
      } else if (option == Option.N_VAL)
      {
        builder.withNVal((Integer) opPair.getValue());
      } else if (option == Option.PR)
      {
View Full Code Here


                        FetchValue.Response fetchResponse;
                        try
                        {
                            fetchResponse = f.get();
                            Object resolved = null;
                            VClock vclock = null;
                           
                            if (!fetchResponse.isNotFound())
                            {
                                if (typeReference == null)
                                {
View Full Code Here

        T resolved = resolver.resolve(convertedValues);
       
        if (hasValues() && resolved != null)
        {
            VClock vclock = values.get(0).getVClock();
            AnnotationUtil.setVClock(resolved, vclock);
        }
       
        return resolved;
    }
View Full Code Here

            ConflictResolverFactory.getInstance().getConflictResolver(typeReference);

        T resolved = resolver.resolve(convertedValues);
        if (hasValues() && resolved != null)
        {
            VClock vclock = values.get(0).getVClock();
            AnnotationUtil.setVClock(resolved, vclock);
        }
       
        return resolved;
    }
View Full Code Here

    @Test
    public void getVClockField()
    {
        final byte[] clockBytes = "a85hYGBgzGDKBVIcypz/fvo/2e2UwZTImMfKwHIy/SRfFgA=".getBytes();
        final VClock expected = new BasicVClock(clockBytes);
        final PojoWithAnnotatedFields pojo = new PojoWithAnnotatedFields();
        pojo.vclock = expected;

        assertEquals(expected, AnnotationUtil.getVClock(pojo));
        assertEquals(expected, AnnotationUtil.getVClock(pojo, null));
View Full Code Here

   
    @Test
    public void setVClockField()
    {
        final byte[] clockBytes = "a85hYGBgzGDKBVIcypz/fvo/2e2UwZTImMfKwHIy/SRfFgA=".getBytes();
        final VClock expected = new BasicVClock(clockBytes);
        final PojoWithAnnotatedFields pojo = new PojoWithAnnotatedFields();
        AnnotationUtil.setVClock(pojo, expected);
       
        assertNotNull(pojo.vclock);
        assertEquals(expected, pojo.vclock);
View Full Code Here

   
    @Test
    public void getVClockMethod()
    {
        final byte[] clockBytes = "a85hYGBgzGDKBVIcypz/fvo/2e2UwZTImMfKwHIy/SRfFgA=".getBytes();
        final VClock expected = new BasicVClock(clockBytes);
        final PojoWithAnnotatedMethods pojo = new PojoWithAnnotatedMethods();
        pojo.setVClock(expected);
       
        assertEquals(expected, AnnotationUtil.getVClock(pojo));
        assertEquals(expected, AnnotationUtil.getVClock(pojo, null));
View Full Code Here

   
    @Test
    public void getVClockByteMethod()
    {
        final byte[] clockBytes = "a85hYGBgzGDKBVIcypz/fvo/2e2UwZTImMfKwHIy/SRfFgA=".getBytes();
        final VClock expected = new BasicVClock(clockBytes);
        final PojoWithAnnotatedByteMethods pojo = new PojoWithAnnotatedByteMethods();
        pojo.setVClock(clockBytes);
       
        assertEquals(expected, AnnotationUtil.getVClock(pojo));
        assertEquals(expected, AnnotationUtil.getVClock(pojo, null));
View Full Code Here

   
    @Test
    public void setVClockMethod()
    {
        final byte[] clockBytes = "a85hYGBgzGDKBVIcypz/fvo/2e2UwZTImMfKwHIy/SRfFgA=".getBytes();
        final VClock expected = new BasicVClock(clockBytes);
        final PojoWithAnnotatedMethods pojo = new PojoWithAnnotatedMethods();
        AnnotationUtil.setVClock(pojo, expected);
       
        assertNotNull(pojo.vClock);
        assertEquals(expected, pojo.vClock);
View Full Code Here

   
    @Test
    public void setVClockByteMethod()
    {
        final byte[] clockBytes = "a85hYGBgzGDKBVIcypz/fvo/2e2UwZTImMfKwHIy/SRfFgA=".getBytes();
        final VClock expected = new BasicVClock(clockBytes);
        final PojoWithAnnotatedByteMethods pojo = new PojoWithAnnotatedByteMethods();
        AnnotationUtil.setVClock(pojo, expected);
       
        assertNotNull(pojo.vclock);
        assertArrayEquals(clockBytes, pojo.vclock);
View Full Code Here

TOP

Related Classes of com.basho.riak.client.api.cap.VClock

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.