code: @Override
  	public void onQuery() {
  
  		final App app = StructrApp.getInstance();
  		try (final Tx tx = app.tx()) {
  
  			final Map<String, SharedNodeInterface> nodes = new LinkedHashMap<>();
  			for (final SharedNodeInterface node : app.nodeQuery(SharedNodeInterface.class).getAsList()) {
  				nodes.put(node.getUuid(), node);
  			}
  
  			if (nodes.size() != repository.objectCount()) {
  
  				logger.info("Rebuilding list of shared objects: {} vs. {}", new Object[] { nodes.size(), repository.objectCount() } );
  
  				repository.clear();
  
  				for (final SharedNodeInterface node : nodes.values()) {
  					addObjectToRepository(node);
  				}
  			}
  
  			tx.success();
  
  		} catch (FrameworkException fex) {
  
  			logger.warn("", fex);
  		}
  	}
docs: ----- interface UpdateListener -----