test_class.declarator: checker
test_class.modifier: private
test_class.original_string: private SolrDiskSpaceChecker checker;
test_class.type: SolrDiskSpaceChecker
test_class.var_name: checker
test_class.declarator: configuration = new HashMap<>()
test_class.modifier: private
test_class.original_string: private Map<String, Object> configuration = new HashMap<>();
test_class.type: Map<String, Object>
test_class.var_name: configuration
test_class.declarator: threshold = mock(DiskSpaceThreshold.class)
test_class.modifier: private
test_class.original_string: private DiskSpaceThreshold threshold = mock(DiskSpaceThreshold.class);
test_class.type: DiskSpaceThreshold
test_class.var_name: threshold
test_class.file: harahachibu/src/test/java/uk/co/flax/harahachibu/services/impl/SolrDiskSpaceCheckerTest.java
test_class.identifier: SolrDiskSpaceCheckerTest
test_case.body: @Test(expected = uk.co.flax.harahachibu.services.DiskSpaceCheckerException.class)
  	public void configureThrowsExceptionWhenDataDirNotExist() throws Exception {
  		configuration.put(SolrDiskSpaceChecker.DATA_DIR_CONFIG_OPTION, "/no_such_path");
  		checker.configure(configuration);
  	}
test_case.class_method_signature: SolrDiskSpaceCheckerTest.configureThrowsExceptionWhenDataDirNotExist()
test_case.full_signature: @Test(expected = uk.co.flax.harahachibu.services.DiskSpaceCheckerException.class) public void configureThrowsExceptionWhenDataDirNotExist()
test_case.identifier: configureThrowsExceptionWhenDataDirNotExist
test_case.invocations: put configure
test_case.modifiers: @Test(expected = uk.co.flax.harahachibu.services.DiskSpaceCheckerException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void configureThrowsExceptionWhenDataDirNotExist()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(SolrDiskSpaceChecker.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(SolrDiskSpaceChecker.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: DATA_DIR_CONFIG_OPTION = "dataDirectory"
focal_class.modifier: public static final
focal_class.original_string: public static final String DATA_DIR_CONFIG_OPTION = "dataDirectory";
focal_class.type: String
focal_class.var_name: DATA_DIR_CONFIG_OPTION
focal_class.declarator: threshold
focal_class.modifier: private
focal_class.original_string: private DiskSpaceThreshold threshold;
focal_class.type: DiskSpaceThreshold
focal_class.var_name: threshold
focal_class.declarator: fs
focal_class.modifier: private
focal_class.original_string: private FileStore fs;
focal_class.type: FileStore
focal_class.var_name: fs
focal_class.file: harahachibu/src/main/java/uk/co/flax/harahachibu/services/impl/SolrDiskSpaceChecker.java
focal_class.identifier: SolrDiskSpaceChecker
focal_class.interfaces: implements DiskSpaceChecker
focal_class.class_method_signature: SolrDiskSpaceChecker.isSpaceAvailable()
focal_class.full_signature: @Override public boolean isSpaceAvailable()
focal_class.identifier: isSpaceAvailable
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isSpaceAvailable()
focal_class.class_method_signature: SolrDiskSpaceChecker.configure(Map<String, Object> configuration)
focal_class.full_signature: @Override public void configure(Map<String, Object> configuration)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (Map<String, Object> configuration)
focal_class.return: void
focal_class.signature: void configure(Map<String, Object> configuration)
focal_class.class_method_signature: SolrDiskSpaceChecker.requiresHttpClient()
focal_class.full_signature: @Override public boolean requiresHttpClient()
focal_class.identifier: requiresHttpClient
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean requiresHttpClient()
focal_class.class_method_signature: SolrDiskSpaceChecker.setHttpClient(Client httpClient)
focal_class.full_signature: @Override public void setHttpClient(Client httpClient)
focal_class.identifier: setHttpClient
focal_class.modifiers: @Override public
focal_class.parameters: (Client httpClient)
focal_class.return: void
focal_class.signature: void setHttpClient(Client httpClient)
focal_class.class_method_signature: SolrDiskSpaceChecker.setThreshold(DiskSpaceThreshold threshold)
focal_class.full_signature: @Override public void setThreshold(DiskSpaceThreshold threshold)
focal_class.identifier: setThreshold
focal_class.modifiers: @Override public
focal_class.parameters: (DiskSpaceThreshold threshold)
focal_class.return: void
focal_class.signature: void setThreshold(DiskSpaceThreshold threshold)
focal_class.class_method_signature: SolrDiskSpaceChecker.setFileStore(FileStore fs)
focal_class.full_signature: @VisibleForTesting void setFileStore(FileStore fs)
focal_class.identifier: setFileStore
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (FileStore fs)
focal_class.return: void
focal_class.signature: void setFileStore(FileStore fs)
focal_method.body: @Override
  	public void configure(Map<String, Object> configuration) throws DiskSpaceCheckerException {
  		final String dataPath = (String) configuration.get(DATA_DIR_CONFIG_OPTION);
  		if (StringUtils.isBlank(dataPath)) {
  			throw new DiskSpaceCheckerException("No data directory given for Solr disk space checker");
  		} else {
  			try {
  				// Set up the FileStore
  				Path path = FileSystems.getDefault().getPath(dataPath);
  				fs = Files.getFileStore(path);
  			} catch (IOException e) {
  				LOGGER.error("IO Exception initialising file store: {}", e.getMessage());
  				throw new DiskSpaceCheckerException(e);
  			}
  		}
  	}
focal_method.class_method_signature: SolrDiskSpaceChecker.configure(Map<String, Object> configuration)
focal_method.full_signature: @Override public void configure(Map<String, Object> configuration)
focal_method.identifier: configure
focal_method.invocations: get isBlank getPath getDefault getFileStore error getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (Map<String, Object> configuration)
focal_method.return: void
focal_method.signature: void configure(Map<String, Object> configuration)