use of org.commonjava.storage.pathmapped.config.DefaultPathMappedStorageConfig in project indy by Commonjava.
the class DefaultGalleyStorageProvider method getPathMappedStorageConfig.
private PathMappedStorageConfig getPathMappedStorageConfig() {
Map<String, Object> cassandraProps = new HashMap<>();
cassandraProps.put(PROP_CASSANDRA_HOST, cassandraConfig.getCassandraHost());
cassandraProps.put(PROP_CASSANDRA_PORT, cassandraConfig.getCassandraPort());
cassandraProps.put(PROP_CASSANDRA_USER, cassandraConfig.getCassandraUser());
cassandraProps.put(PROP_CASSANDRA_PASS, cassandraConfig.getCassandraPass());
cassandraProps.put(PROP_CASSANDRA_KEYSPACE, config.getCassandraKeyspace());
cassandraProps.put(PROP_CASSANDRA_REPLICATION_FACTOR, getReplicationFactor());
DefaultPathMappedStorageConfig ret = new DefaultPathMappedStorageConfig(cassandraProps);
ret.setFileChecksumAlgorithm(config.getFileChecksumAlgorithm());
ret.setGcBatchSize(config.getGcBatchSize());
ret.setGcGracePeriodInHours(config.getGcGracePeriodInHours());
ret.setGcIntervalInMinutes(config.getGcIntervalInMinutes());
ret.setDeduplicatePattern(config.getDeduplicatePattern());
return ret;
}
Aggregations