HomePhabricator

Clean up BagOStuff::get() interface

Tags
None
Referenced Files
None
Subscribers
None

Description

Clean up BagOStuff::get() interface

  • Callers of get() no longer have to contend with the annoying $casToken parameter, which is there but totally unusable to non-BagOStuff code.
  • The default get() now delegates to doGet(), which callers must implement instead. They can ignore the overhead of generating $casToken if they do not implement cas(), which applies to callers that use the stock merge(). If cas() is used for merge(), then getWithToken() must be implemented.
  • Also add BagOStuff::READ_LATEST to mergeViaCas() for sanity, as that missing before. Likewise with mergeViaLock().

Change-Id: I4efce6a9ab4b1eadd2f161dff641004a7239c516

Details

Provenance
aaronAuthored on
KrinkleCommitted on Oct 7 2015, 2:54 AM
Parents
rMW36407f4d26fe: Merge "Remove begin/commit from recordOldUpload()"
Branches
Unknown
Tags
Unknown
ChangeId
I4efce6a9ab4b1eadd2f161dff641004a7239c516