google-nomulus/java/google/registry
guyben 978149e677 Create an injectable LockHandler
We create an injectable LockHandler that just calls the static
Lock.executeWithLocks function.

I'm not sure what's the correct place to put the LockHandler. I think
model/server is only appropriate for the actual datastore lock. This is a "per request" lock, so maybe request/lock?

-----------------------------

This is the initial step in adding the "lock implicitly released on request death" feature, but it's also useful on its own - easier to test Actions when we can use a fake lock.

To keep this CL simple, we keep using the old Lock as is in most places. We just choose a single example to convert to LockHandler to showcase it. Converting all other uses will be in a subsequent CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167357564
2017-09-12 15:51:50 -04:00
..
backup Add and fix mapreduce counters 2017-08-29 17:21:43 -04:00
batch Fix soft delete for possible double-map of domain 2017-09-12 14:57:34 -04:00
bigquery Add activity report generation code 2017-08-29 15:53:33 -04:00
braintree Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
builddefs Rename set to depset in .bzl and BUILD files 2017-08-29 16:53:21 -04:00
config Shorten the lock timeout for rdeStaging 2017-08-29 16:59:18 -04:00
cron Change @Auth to an AutoValue, and created a set of predefined Auths 2017-08-01 16:33:10 -04:00
dns Make DnsWriter truly atomic 2017-08-29 16:40:07 -04:00
eclipse Add Cloud KMS as dependency of eclipse package 2017-03-21 15:17:04 -04:00
env Add PollMapreduceAction 2017-09-12 15:51:44 -04:00
export Create an injectable LockHandler 2017-09-12 15:51:50 -04:00
flows Filter cancellation records for only cancellable records 2017-09-12 15:51:50 -04:00
gcs Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
groups Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
idn Run buildifier on codebase to format BUILD files 2016-11-28 18:15:21 -05:00
keyring Set KmsKeyring as the default Keyring 2017-07-10 11:40:02 -04:00
loadtest Change @Auth to an AutoValue, and created a set of predefined Auths 2017-08-01 16:33:10 -04:00
mapreduce Retry Datastore errors in CommitLogManifestReader.next() 2017-08-29 16:06:48 -04:00
model Record domain transaction for domain transfers 2017-08-29 17:17:07 -04:00
module Add PollMapreduceAction 2017-09-12 15:51:44 -04:00
monitoring Change @Auth to an AutoValue, and created a set of predefined Auths 2017-08-01 16:33:10 -04:00
pricing Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
rdap Parent recurring billing events under separate HistoryEntries 2017-08-29 17:08:27 -04:00
rde Correct usages of DateTime.now() everywhere to DateTime.now(UTC) 2017-08-29 17:09:53 -04:00
reporting Add transaction report generation code 2017-09-12 15:51:50 -04:00
request Create an injectable LockHandler 2017-09-12 15:51:50 -04:00
security Remove XsrfTokenManager fallback for validating legacy tokens 2017-03-21 15:36:31 -04:00
storage/drive Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tldconfig/idn Update copyright year on all license headers 2017-02-02 16:27:22 -05:00
tmch Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
tools Create an entity record accumulator 2017-09-12 15:51:50 -04:00
ui Use JSON.parse instead of deprecated goog.json.parse. 2017-08-29 17:12:44 -04:00
util Retry Datastore errors in CommitLogManifestReader.next() 2017-08-29 16:06:48 -04:00
whois Make Registrar load methods return Optionals instead of Nullables 2017-08-01 16:58:59 -04:00
xjc Fix the build on MacOS 2017-07-12 11:03:50 -04:00
xml Add the ability to generate RDE deposits in lenient mode 2017-05-17 12:22:49 -04:00
BUILD Document procedural changes to restore 2017-05-03 10:43:25 -04:00
repositories.bzl Migrate {css} and {xid} tags to new builtinfunctions css() and xid() 2017-08-29 15:56:43 -04:00