byte[]
707708709710711712713
final PojoWithAnnotatedFields pojo = new PojoWithAnnotatedFields(); pojo.vclock = expected; final byte[] clockBytes = "a85hYGBgzGDKBVIcypz/fvo/2e2UwZTImMfKwHIy/SRfFgA=".getBytes(); assertNull(AnnotationUtil.getVClock(pojo)); assertNotNull(AnnotationUtil.getVClock(pojo, new BasicVClock(clockBytes) )); }
719720721722723724725
final PojoWithAnnotatedMethods pojo = new PojoWithAnnotatedMethods(); pojo.setVClock(expected); assertNull(AnnotationUtil.getVClock(pojo)); final byte[] clockBytes = "a85hYGBgzGDKBVIcypz/fvo/2e2UwZTImMfKwHIy/SRfFgA=".getBytes(); assertNotNull(AnnotationUtil.getVClock(pojo, new BasicVClock(clockBytes))); }
363364365366367368369370371372373374375376377378379380
{ vclock = (VClock) getFieldValue(riakVClockField, obj); } else { vclock = new BasicVClock((byte[]) getFieldValue(riakVClockField, obj)); } } else if (riakVClockGetter != null) { if (riakVClockGetter.getReturnType().isArray()) { vclock = new BasicVClock((byte[]) getMethodValue(riakVClockGetter, obj)); } else { vclock = (VClock) getMethodValue(riakVClockGetter, obj); }
4950515253545556575859
private RiakObjectConverter() {} public static List<RiakObject> convert(List<RpbContent> contentList, ByteString contentVClock) { List<RiakObject> roList = new LinkedList<RiakObject>(); BasicVClock vclock = new BasicVClock(contentVClock.toByteArray()); for (RpbContent content : contentList) { RiakObject ro = new RiakObject();
101102103104105106107108109110111
// it deleted if (response.getContentCount() == 0) { RiakObject ro = new RiakObject() .setDeleted(true) .setVClock(new BasicVClock(response.getVclock().toByteArray())); responseBuilder.addObject(ro); } else {
130131132133134135136137
* @return this * @throws IllegalArgumentException * for a null vclock */ public RiakObjectBuilder withVClock(byte[] vclock) { this.vclock = new BasicVClock(vclock); return this; }
4546474849505152535455
*/ public RiakResponse(byte[] vclock, IRiakObject[] riakObjects) { if (vclock == null) { this.vclock = null; } else { this.vclock = new BasicVClock(vclock); } if (riakObjects == null) { this.riakObjects = NO_OBJECTS; } else { this.riakObjects = riakObjects;
6768697071727374757677
*/ public RiakResponse(byte[] vclock) { if (vclock == null) { throw new IllegalArgumentException("vclock cannot be null"); } else { this.vclock = new BasicVClock(vclock); } this.riakObjects = NO_OBJECTS; this.unmodified = false; this.deleted = true; }