A convenience class stroring , retrieving {@link IRiakObject} from Riakwithout specifying a pass through {@link Converter} for each operation.
220221222223224225226227228229230231232
{ final KeyValueMessage kvMessage = (KeyValueMessage) parameters[0]; final String key = kvMessage.getKey (); // FIXME: use the vector clock... final IRiakObject riakObject = RiakObjectBuilder.newBuilder (RiakOperationFactory.this.bucket.getName (), key).addUsermeta (IOperationFactory.CONTENT_ENCODING, kvMessage.getContentEncoding ()).withContentType (kvMessage.getContentType ()).withValue (kvMessage.getData ()).build (); final RiakBucket riakBucket = RiakBucket.newRiakBucket (RiakOperationFactory.this.bucket); try { riakBucket.store (riakObject); } catch (final RiakException e) { // TODO: shutdown all connectors for this bucket? FallbackExceptionTracer.defaultInstance.traceIgnoredException (e); return false; }