Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public User IncrementVisits(String userId, String name)
- {
- Key recordKey = new Key(NAMESPACE, RECORD_SET, userId);
- Bin nameBin = new Bin(NAME_BIN, name);
- Bin visitBin = new Bin(VISIT_BIN, 1);
- Record record = asClient.Operate(null, recordKey,
- Operation.Add(visitBin),
- Operation.Put(nameBin),
- Operation.Get(NAME_BIN),
- Operation.Get(VISIT_BIN));
- return new User(userId, record.GetString(NAME_BIN), record.GetLong(VISIT_BIN));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement