History log of /external/guice/core/src/com/google/inject/internal/BindingProcessor.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5e6c93348c4250012801b6e41753789d760f06e4 20-Apr-2015 timofeyb <timofeyb@google.com> Implement more granular locks for a Singleton scope in Guice.

Now when you can create two independent singletons using
the same injector in different threads.
This make it easy to create scopes creating singletons using
thread pools with all the concurrency being done by Guice.
As a nice side effect Singleton scope is no longer treated
specially in Guice codebase.

The obvious problem to solve is potential deadlocks:
A requires B, B requires C, C requires A where all are
singletons and all are created simultaneously.
It's impossible to detect this deadlock using information
within one thread, so we have to have a shared storage.

An idea is to have a map of creators' locks and a map
of which threads are waiting for other singletons to be created.
Using this information circular dependencies are trivially
discovered within O(N) where N is a number of concurrent threads.

Important to not that no other deadlock scenarios within
Guice code is introduced as Guice does not expose any
other scopes that can span several threads.

Now it would be possible for
client code to deadlock on itself with two lazy singletons
calling each other's providers during creation.
This is deemed as a non-issue as it is up to the client
to write a thread-safe code.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=91610630
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
8ad60eb50961e000c89099bb767489cf551d995b 10-Mar-2014 Sam Berlin <sameb@google.com> Change LinkedBindingBuilder.toProvider(Provider) to accept a jsr330 provider,
in addition to the Guice Provider. This is an incompatible change for people who extend LinkedBindingBuilder, but not for people who use it.

This will allow people to switch to JSR330 types more easily.

LinkedBindingBuilder needs both toProvider(Provider) and toProvider(javax.inject.Provider) because precompiled jars (e.g, stuff in third_party, maven, etc..) that used toProvider(Provider) would otherwise throw a NoSuchMethodError.

I left the getProviderInstance method on ProviderInstanceBinding, otherwise
that would require anyone using the SPI method to change their code to accept
the weaker type.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=61966924
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
bf2b16c06a5ff7c099fe60f9a46cfb130ce45962 16-May-2013 Christian Edward Gruber <cgruber@google.com> Add support for ProvisionListeners to notify on toInstance & constant bindings.

---------------------
Manually synced.
COMMIT=41634417
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
c756777526309dc6c9ff2b5df80a8f811d390c09 01-Jun-2012 Sam Berlin <sameb@google.com> Add Binder.requireAtInjectOnConstructors, to force Guice to require @Inject annotations on constructors.

Revision created by MOE tool push_codebase.
MOE_MIGRATION=4906
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
d51292d5a4a788b1275eb9ad55cf612e68640bbf 27-Feb-2012 Sam Berlin <sameb@google.com> Change ProvisionListener to expose Binding instead of Key, and change bindListener to use a Matcher for Binding instead of Key. This is a backwards incompatible change, but we haven't released yet, so it's worth doing.

Revision created by MOE tool push_codebase.
MOE_MIGRATION=4269
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
b7a02b02d81c830d148355c90bc309bcd66fb592 08-Jul-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> * Remove unused imports
* Sort imports
* Convert tabs to spaces
* Fix the ant no_aop build


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2532


git-svn-id: https://google-guice.googlecode.com/svn/trunk@1572 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
ba75f3563a179ddd3de14cfed6ba663e9e298032 12-Jun-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> issue 631 -- expose dependency hierarchy in ProvisionListener.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1553 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
132a5db7c643b8f367eb5f09024cf13ea37c9831 05-Jun-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> issue 78 - provision interception. this only lets you listen to provisions (both before & after provisioning occurs), it does not let you change the return value of the provision.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1551 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
c94f4506c70ea41068ed9c5a00ddf6711eb7357f 02-May-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> assert that ProviderInternalFactory doesn't think circular dependencies exist when the providers are in different PrivateModules, temporarily remove check for @ProvidedBy due to other things that need fixing first.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1545 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
425d099754a30565152d166d13ec1e951ff19410 02-May-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> fix provider circular dependency detection to use the Key it is creating, not the Key it is fulfulling, to catch errors sooner.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1544 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
e6ce1886f5f8f700cea00bafefd093ccbbe8addf 30-Apr-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> fix issue 626 -- properly handle circular proxies between providers (either failing or proxying), prevents StackOverflowErrors.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1543 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
07170cc3f59f08954c97e19f2d3cf165d3a8601a 11-Mar-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> remove phases from BindingProcessor, refactor so that two different classes do the two different bits, with an abstract superclass managing the shared pieces.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1527 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
920731718b6f3505cdfeefeabd789539603de18a 11-Mar-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> fix issue 614 -- admittedly not the prettiest solution, but it works.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1526 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
0d8b52f2099648805ec1e8aff9399b76856ad1d4 21-Feb-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> issue 608 - child can rebind a parent binding if it was just-in-time.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1504 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
45ca7f66156b947c7b9c45a71ad48be9a0bcda08 20-Feb-2011 sberlin <sberlin@d779f126-a31b-0410-b53b-1d3aecad763e> issue 345 - better error message for private modules. show the source of a child binding instead of just saying its in a child injector. also give a hint that you may have wanted to expose the binding.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1498 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
fc46e1a98e70d22e5674a4aa42ede2fdede6a25a 15-Dec-2010 limpbizkit@gmail.com <limpbizkit@gmail.com@d779f126-a31b-0410-b53b-1d3aecad763e> Fix warnings in core.

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1460 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java
74d714c1e72bb60706ed9df4d1982971c88c10aa 21-Oct-2010 mcculls <mcculls@d779f126-a31b-0410-b53b-1d3aecad763e> Issue 552: (step 1) move core code to its own subdirectory

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1300 d779f126-a31b-0410-b53b-1d3aecad763e
/external/guice/core/src/com/google/inject/internal/BindingProcessor.java