in src/main/java/com/googlesource/gerrit/plugins/quota/Module.java [70:98]
protected void configure() {
DynamicSet.bind(binder(), ProjectCreationValidationListener.class)
.to(MaxRepositoriesQuotaValidator.class);
DynamicSet.bind(binder(), QuotaEnforcer.class).to(MaxRepositorySizeQuota.class);
DynamicSet.bind(binder(), ProjectDeletedListener.class).to(DeletionListener.class);
DynamicSet.bind(binder(), GarbageCollectorListener.class).to(GCListener.class);
DynamicSet.setOf(binder(), UsageDataEventCreator.class);
DynamicSet.bind(binder(), UsageDataEventCreator.class).to(RepoSizeEventCreator.class);
install(MaxRepositorySizeQuota.module());
install(
new RestApiModule() {
@Override
protected void configure() {
DynamicMap.mapOf(binder(), QUOTA_KIND);
get(PROJECT_KIND, "quota").to(GetQuota.class);
child(CONFIG_KIND, "quota").to(GetQuotas.class);
}
});
bind(Publisher.class).in(Scopes.SINGLETON);
bind(PublisherScheduler.class).in(Scopes.SINGLETON);
bind(LifecycleListener.class)
.annotatedWith(UniqueAnnotations.create())
.to(PublisherScheduler.class);
DynamicSet.bind(binder(), UploadValidationListener.class).to(RateLimitUploadListener.class);
bindConstant()
.annotatedWith(Names.named(RateMsgHelper.UPLOADPACK_CONFIGURABLE_MSG_ANNOTATION))
.to(uploadpackLimitExceededMsg);
}