in src/main/java/com/googlesource/gerrit/plugins/validation/dfsrefdb/zookeeper/ZkValidationModule.java [37:60]
protected void configure() {
logger.atInfo().log("Shared ref-db engine: Zookeeper");
DynamicItem.bind(binder(), GlobalRefDatabase.class)
.to(ZkSharedRefDatabase.class)
.in(Scopes.SINGLETON);
bind(CuratorFramework.class).toInstance(cfg.buildCurator());
bind(ZkConnectionConfig.class)
.toInstance(
new ZkConnectionConfig(cfg.buildCasRetryPolicy(), cfg.getZkInterProcessLockTimeOut()));
DynamicSet.setOf(binder(), StringDeserializer.class);
DynamicSet.bind(binder(), StringDeserializer.class)
.to(StringToIntDeserializer.class)
.in(Scopes.SINGLETON);
DynamicSet.bind(binder(), StringDeserializer.class)
.to(StringToLongDeserializer.class)
.in(Scopes.SINGLETON);
DynamicSet.bind(binder(), StringDeserializer.class)
.to(StringToObjectIdDeserializer.class)
.in(Scopes.SINGLETON);
DynamicSet.bind(binder(), StringDeserializer.class)
.to(IdentityDeserializer.class)
.in(Scopes.SINGLETON);
}