public Persist(string bucket, string key, string vectorClock, RiakContent content, uint write, uint dw, bool returnBody) : this(bucket, key, content, write, dw, returnBody) { // Not sure why, but this causes the Riak server to fail to respond at ALL //VectorClock = vectorClock.ToBytes(); }
public Persist(string bucket, string key, RiakContent content, uint write, uint dw, bool returnBody) { Bucket = bucket.ToBytes(); Key = key.ToBytes(); Content = content; Write = write.ToggleEndianicity(); Dw = dw.ToggleEndianicity(); ReturnBody = returnBody; }
public bool Persist <T>(string bucket, string key, string vectorClock, Document <T> document, uint writeQuorum, uint minimumWrites) { var riakContent = new RiakContent(document.Value.ToProtocolBuffer(), document.ContentType, document.Charset, document.ContentEncoding, document.VectorClock, document.LastModified, document.LastModifiedInSeconds); var command = vectorClock == null ? CommandFactory.CreatePersistNew(bucket, key, riakContent, writeQuorum, minimumWrites, true) : CommandFactory.CreatePersistExisting(bucket, key, vectorClock, riakContent, writeQuorum, minimumWrites, true); Persisted result; var success = (result = command.Execute()) != null; if (success) { VectorClockLookup.SetVectorFor(key, ByteExtensions.FromBytes(result.VectorClock)); } return(success); }
public Persist CreatePersistExisting( string bucket, string key, string vectorClock, RiakContent content, uint write, uint dw, bool returnBody ) { return new Persist( bucket, key, vectorClock, content, write, dw, returnBody ); }
public Persist CreatePersistNew( string bucket, string key, RiakContent content, uint write, uint dw, bool returnBody ) { return new Persist( bucket, key, content, write, dw, returnBody ); }