Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public Tuple<Int64, Int64> IncrementMultiple(string counterName, string firstCounter, long firstBy, string secondCounter, long secondBy)
  2. {
  3.  
  4. Key recordKey = new Key(NAMESPACE, MULTI_SET, counterName);
  5.  
  6. Bin incrementCounter1 = new Bin(firstCounter, firstBy);
  7. Bin incrementCounter2 = new Bin(secondCounter, secondBy);
  8.  
  9. Record record = asClient.Operate(null, recordKey, Operation.Add(incrementCounter1), Operation.Add(incrementCounter2), Operation.Get(firstCounter), Operation.Get(secondCounter));
  10. return Tuple.Create<Int64, Int64>(record.GetLong(firstCounter), record.GetLong(secondCounter));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement