Search in sources :

Example 1 with VisibleForTesting

use of com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting in project janusgraph by JanusGraph.

the class CQLStoreManager method getSpeculativeRetry.

@VisibleForTesting
String getSpeculativeRetry(final String name) throws BackendException {
    TableMetadata tableMetadata = getTableMetadata(name);
    Object res = tableMetadata.getOptions().get(CqlIdentifier.fromCql("speculative_retry"));
    return (String) res;
}
Also used : TableMetadata(com.datastax.oss.driver.api.core.metadata.schema.TableMetadata) VisibleForTesting(com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting)

Example 2 with VisibleForTesting

use of com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting in project janusgraph by JanusGraph.

the class CQLStoreManager method getGcGraceSeconds.

@VisibleForTesting
Integer getGcGraceSeconds(final String name) throws BackendException {
    TableMetadata tableMetadata = getTableMetadata(name);
    Object gcGraceSeconds = tableMetadata.getOptions().get(CqlIdentifier.fromCql("gc_grace_seconds"));
    return (Integer) gcGraceSeconds;
}
Also used : TableMetadata(com.datastax.oss.driver.api.core.metadata.schema.TableMetadata) VisibleForTesting(com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting)

Example 3 with VisibleForTesting

use of com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting in project janusgraph by JanusGraph.

the class CQLStoreManager method getCompressionOptions.

@VisibleForTesting
Map<String, String> getCompressionOptions(final String name) throws BackendException {
    TableMetadata tableMetadata = getTableMetadata(name);
    Object compressionOptions = tableMetadata.getOptions().get(CqlIdentifier.fromCql("compression"));
    return (Map<String, String>) compressionOptions;
}
Also used : TableMetadata(com.datastax.oss.driver.api.core.metadata.schema.TableMetadata) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(io.vavr.collection.HashMap) VisibleForTesting(com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting)

Aggregations

TableMetadata (com.datastax.oss.driver.api.core.metadata.schema.TableMetadata)3 VisibleForTesting (com.datastax.oss.driver.shaded.guava.common.annotations.VisibleForTesting)3 HashMap (io.vavr.collection.HashMap)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1