/** * Retrieves the number of {@link BlobStoreInfo}s in the blobstore configuration. * * @return The number of {@link BlobStoreInfo}s currently configured. */ public int getBlobStoreCount() { int count = 0; for (BlobStoreConfiguration configuration : getConfigs()) { count += configuration.getBlobStoreCount(); } return count; }
private int initialize(BlobStoreConfiguration config) { if (config == null) { throw new IllegalStateException( "BlobStoreConfiguration got a null GWC configuration object"); } String configIdent; try { configIdent = config.getIdentifier(); } catch (Exception gwce) { log.error("Error obtaining identify from BlobStoreConfiguration " + config, gwce); return 0; } if (configIdent == null) { log.warn("Got a GWC configuration with no identity, ignoring it:" + config); return 0; } int blobStoreCount = config.getBlobStoreCount(); if (blobStoreCount <= 0) { log.info( "BlobStoreConfiguration " + config.getIdentifier() + " contained no blob store infos."); } // Check whether there is any general service information if (this.serviceInformation == null && config instanceof ServerConfiguration) { log.debug("Reading service information."); this.serviceInformation = ((ServerConfiguration) config).getServiceInformation(); } return blobStoreCount; }