Rely on @ImplementedBy for binding default repomgr
We want to allow the re-binding of the default LocalRepositoryManager to alternative implementations. By using the @ImplementedBy annotation we enable this scenario. Change-Id: Ia700a945721ed1128a52edd6377e60f2c44478a0
This commit is contained in:
parent
4c24c11a4c
commit
8e5418db0a
@ -15,6 +15,7 @@
|
||||
package com.google.gerrit.server.git;
|
||||
|
||||
import com.google.gerrit.reviewdb.client.Project;
|
||||
import com.google.inject.ImplementedBy;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.eclipse.jgit.errors.RepositoryNotFoundException;
|
||||
@ -30,6 +31,7 @@ import java.util.SortedSet;
|
||||
* registered in Guice so they are globally available within the server
|
||||
* environment.
|
||||
*/
|
||||
@ImplementedBy(value = LocalDiskRepositoryManager.class)
|
||||
public interface GitRepositoryManager {
|
||||
/**
|
||||
* Get (or open) a repository by name.
|
||||
|
@ -61,7 +61,6 @@ public class LocalDiskRepositoryManager implements GitRepositoryManager {
|
||||
public static class Module extends LifecycleModule {
|
||||
@Override
|
||||
protected void configure() {
|
||||
bind(GitRepositoryManager.class).to(LocalDiskRepositoryManager.class);
|
||||
listener().to(LocalDiskRepositoryManager.Lifecycle.class);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user