@Override protected void postInit() throws InitializationException, InterruptedException { super.postInit(); registryRemotes.clear(); registerRegistryRemotes(); bindRegistryRemoteToRemoteRegistries(); }
@Override public void activate() throws InterruptedException, CouldNotPerformException { super.activate(); getRemoteRegistries().forEach((remoteRegistry) -> { remoteRegistry.addObserver(synchronisationObserver); }); // initial check synchronized (virtualRegistrySyncLock) { virtualRegistrySyncLock.notifyAll(); } }
@Override public Boolean isReady() throws InterruptedException { return isDataAvailable() && super.isReady(); }
/** * {@inheritDoc } * * @throws InterruptedException {@inheritDoc } * @throws CouldNotPerformException {@inheritDoc } */ @Override public void activate() throws InterruptedException, CouldNotPerformException { if (!CachedLocationRegistryRemote.getRegistry().equals(this)) { logger.warn("You are using a " + getClass().getSimpleName() + " which is not maintained by the global registry singelton! This is extremely inefficient! Please use \"Registries.get" + getClass().getSimpleName().replace("Remote", "") + "()\" instead creating your own instances!"); } authorizationFilter.setAuthorizationGroups(unitRegistry.getAuthorizationGroupUnitConfigRemoteRegistry().getEntryMap()); authorizationFilter.setLocations(locationUnitConfigRemoteRegistry.getEntryMap()); super.activate(); }
private void waitForVirtualRegistrySync() throws InterruptedException { synchronized (virtualRegistrySyncLock) { while (!isVirtualRegistrySynchronized()) { virtualRegistrySyncLock.wait(); } } }
/** * {@inheritDoc } * * @throws InterruptedException {@inheritDoc } * @throws CouldNotPerformException {@inheritDoc } */ @Override public void activate() throws InterruptedException, CouldNotPerformException { if (!CachedUserRegistryRemote.getRegistry().equals(this)) { logger.warn("You are using a " + getClass().getSimpleName() + " which is not maintained by the global registry singelton! This is extremely inefficient! Please use \"Registries.get" + getClass().getSimpleName().replace("Remote", "") + "()\" instead creating your own instances!"); } authorizationFilter.setAuthorizationGroups(unitRegistry.getAuthorizationGroupUnitConfigRemoteRegistry().getEntryMap()); authorizationFilter.setLocations(unitRegistry.getLocationUnitConfigRemoteRegistry().getEntryMap()); super.activate(); }
@Override public boolean isDataAvailable() { for (RegistryRemote registryRemote : registryRemotes) { if (!registryRemote.isDataAvailable()) { return false; } } // TODO release: // workaround, should be removed in release scrab virtualRegistryInitiallySynchronized = virtualRegistryInitiallySynchronized || isVirtualRegistrySynchronized(); return super.isDataAvailable() && virtualRegistryInitiallySynchronized; }
/** * {@inheritDoc } * * @throws InterruptedException {@inheritDoc } * @throws CouldNotPerformException {@inheritDoc } */ @Override public void activate() throws InterruptedException, CouldNotPerformException { if (!CachedDeviceRegistryRemote.getRegistry().equals(this)) { logger.warn("You are using a " + getClass().getSimpleName() + " which is not maintained by the global registry singelton! This is extremely inefficient! Please use \"Registries.get" + getClass().getSimpleName().replace("Remote", "") + "()\" instead creating your own instances!"); } authorizationFilter.setAuthorizationGroups(unitRegistry.getAuthorizationGroupUnitConfigRemoteRegistry().getEntryMap()); authorizationFilter.setLocations(unitRegistry.getLocationUnitConfigRemoteRegistry().getEntryMap()); super.activate(); }
@Override public void deactivate() throws InterruptedException, CouldNotPerformException { getRemoteRegistries().forEach((remoteRegistry) -> { remoteRegistry.removeObserver(synchronisationObserver); }); super.deactivate(); }
/** * {@inheritDoc } * * @throws InterruptedException {@inheritDoc } * @throws CouldNotPerformException {@inheritDoc } */ @Override public void activate() throws InterruptedException, CouldNotPerformException { if (!CachedAgentRegistryRemote.getRegistry().equals(this)) { logger.warn("You are using a " + getClass().getSimpleName() + " which is not maintained by the global registry singelton! This is extremely inefficient! Please use \"Registries.get" + getClass().getSimpleName().replace("Remote", "") + "()\" instead creating your own instances!"); } authorizationFilter.setAuthorizationGroups(unitRegistry.getAuthorizationGroupUnitConfigRemoteRegistry().getEntryMap()); authorizationFilter.setLocations(unitRegistry.getLocationUnitConfigRemoteRegistry().getEntryMap()); super.activate(); }
/** * {@inheritDoc } * * @throws InterruptedException {@inheritDoc } * @throws CouldNotPerformException {@inheritDoc } */ @Override public void activate() throws InterruptedException, CouldNotPerformException { if (!CachedSceneRegistryRemote.getRegistry().equals(this)) { logger.warn("You are using a " + getClass().getSimpleName() + " which is not maintained by the global registry singelton! This is extremely inefficient! Please use \"Registries.get" + getClass().getSimpleName().replace("Remote", "") + "()\" instead creating your own instances!"); } authorizationFilter.setAuthorizationGroups(unitRegistry.getAuthorizationGroupUnitConfigRemoteRegistry().getEntryMap()); authorizationFilter.setLocations(unitRegistry.getLocationUnitConfigRemoteRegistry().getEntryMap()); super.activate(); }
/** * {@inheritDoc } * * @throws InterruptedException {@inheritDoc } * @throws CouldNotPerformException {@inheritDoc } */ @Override public void activate() throws InterruptedException, CouldNotPerformException { if (!CachedAppRegistryRemote.getRegistry().equals(this)) { logger.warn("You are using a " + getClass().getSimpleName() + " which is not maintained by the global registry singelton! This is extremely inefficient! Please use \"Registries.get" + getClass().getSimpleName().replace("Remote", "") + "()\" instead creating your own instances!"); } authorizationFilter.setAuthorizationGroups(unitRegistry.getAuthorizationGroupUnitConfigRemoteRegistry().getEntryMap()); authorizationFilter.setLocations(unitRegistry.getLocationUnitConfigRemoteRegistry().getEntryMap()); super.activate(); }