Use Dagger to @Inject DnsQueue everywhere that is feasible

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136062053
This commit is contained in:
mcilwain 2016-10-13 11:10:02 -07:00 committed by Ben McIlwain
parent a13f6aded8
commit 6a738557fb
17 changed files with 47 additions and 15 deletions

View file

@ -145,8 +145,13 @@ public class DnsQueue {
}
}
// TODO(b/19483428): Remove me when flows package is ported to Dagger.
/** Creates a new instance. */
/**
* Creates a new instance.
*
* <p><b>Note:</b> Prefer <code>@Inject</code>ing DnsQueue instances instead. You should only use
* this helper method in situations for which injection does not work, e.g. inside mapper or
* reducer classes in mapreduces that need to be Serializable.
*/
public static DnsQueue create() {
DnsQueue result = new DnsQueue();
result.writeLockTimeout = Duration.standardSeconds(120);