Search in sources :

Example 1 with DefaultPathMappedStorageConfig

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;
}
Also used : HashMap(java.util.HashMap) DefaultPathMappedStorageConfig(org.commonjava.storage.pathmapped.config.DefaultPathMappedStorageConfig)

Aggregations

HashMap (java.util.HashMap)1 DefaultPathMappedStorageConfig (org.commonjava.storage.pathmapped.config.DefaultPathMappedStorageConfig)1