RealmService realmService, String chroot) throws RegistryException {
RegistryContext registryContext = registry.getRegistryContext();
if (registryContext.isCacheEnabled() && registry instanceof EmbeddedRegistry) {
this.coreRegistry = new CacheBackedRegistry(registry);
} else {
this.coreRegistry = registry;
}
this.isAPPRemoteRegistry = registry instanceof RemoteRegistry;
this.chrootWrapper = new ChrootWrapper(chroot);