congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
CassandraFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
CassandraFactory
in
com.bazaarvoice.emodb.common.cassandra

Best Java code snippets using com.bazaarvoice.emodb.common.cassandra.CassandraFactory (Showing top 12 results out of 315)

origin: com.bazaarvoice.emodb/emodb-databus

@Provides @Singleton
CassandraKeyspace provideKeyspace(DatabusConfiguration configuration, CassandraFactory factory) {
  Map<String, CassandraKeyspace> keyspaces = factory.build(configuration.getCassandraConfiguration());
  // Databus module should only have one keyspace configured
  checkArgument(keyspaces.size() == 1, "Only one keyspace expected for databus, found %s", keyspaces.keySet());
  return keyspaces.values().iterator().next();
}
origin: bazaarvoice/emodb

@Provides @Singleton @CQLSessionForHintsPollerMap
Map<String, HintsPollerCQLSession> provideCQLSessionsForHintsPoller(BlobStoreConfiguration configuration, CassandraFactory factory) {
  Map<String, HintsPollerCQLSession> cqlSessionMap = Maps.newHashMap();
  for (CassandraConfiguration config : configuration.getCassandraClusters().values()) {
    String clusterName = config.getCluster();
    if(!cqlSessionMap.containsKey(clusterName)) {
      cqlSessionMap.put(clusterName, factory.cqlSessionForHintsPoller(config));
    }
  }
  return ImmutableMap.copyOf(cqlSessionMap);
}
origin: bazaarvoice/emodb

CassandraHealthCheck healthCheck = newHealthCheck(healthCheckKeyspace, healthCheckConfig.getHealthCheckCql());
_healthChecks.addHealthCheck(healthCheckConfig.getName(), healthCheck);
origin: com.bazaarvoice.emodb/emodb-common-astyanax

CassandraHealthCheck healthCheck = newHealthCheck(healthCheckKeyspace, healthCheckConfig.getHealthCheckCql());
_healthChecks.addHealthCheck(healthCheckConfig.getName(), healthCheck);
origin: bazaarvoice/emodb

  @Provides @Singleton
  CassandraKeyspace provideKeyspace(QueueConfiguration configuration, CassandraFactory factory) {
    Map<String, CassandraKeyspace> keyspaces = factory.build(configuration.getCassandraConfiguration());
    // Queue module should only have one keyspace configured
    checkArgument(keyspaces.size() == 1, "Only one keyspace expected for queue, found %s", keyspaces.keySet());
    return keyspaces.values().iterator().next();
  }
}
origin: bazaarvoice/emodb

@Provides @Singleton @CQLSessionForHintsPollerMap
Map<String, HintsPollerCQLSession> provideCQLSessionsForHintsPoller(DataStoreConfiguration configuration, CassandraFactory factory) {
  Map<String, HintsPollerCQLSession> cqlSessionMap = Maps.newHashMap();
  for (CassandraConfiguration config : configuration.getCassandraClusters().values()) {
    String clusterName = config.getCluster();
    if(!cqlSessionMap.containsKey(clusterName)) {
      cqlSessionMap.put(clusterName, factory.cqlSessionForHintsPoller(config));
    }
  }
  return ImmutableMap.copyOf(cqlSessionMap);
}
origin: bazaarvoice/emodb

@Provides @Singleton
CassandraKeyspace provideKeyspace(DatabusConfiguration configuration, CassandraFactory factory) {
  Map<String, CassandraKeyspace> keyspaces = factory.build(configuration.getCassandraConfiguration());
  // Databus module should only have one keyspace configured
  checkArgument(keyspaces.size() == 1, "Only one keyspace expected for databus, found %s", keyspaces.keySet());
  return keyspaces.values().iterator().next();
}
origin: com.bazaarvoice.emodb/emodb-sor

@Provides @Singleton @CQLSessionForHintsPollerMap
Map<String, HintsPollerCQLSession> provideCQLSessionsForHintsPoller(DataStoreConfiguration configuration, CassandraFactory factory) {
  Map<String, HintsPollerCQLSession> cqlSessionMap = Maps.newHashMap();
  for (CassandraConfiguration config : configuration.getCassandraClusters().values()) {
    String clusterName = config.getCluster();
    if(!cqlSessionMap.containsKey(clusterName)) {
      cqlSessionMap.put(clusterName, factory.cqlSessionForHintsPoller(config));
    }
  }
  return ImmutableMap.copyOf(cqlSessionMap);
}
origin: com.bazaarvoice.emodb/emodb-queue

  @Provides @Singleton
  CassandraKeyspace provideKeyspace(QueueConfiguration configuration, CassandraFactory factory) {
    Map<String, CassandraKeyspace> keyspaces = factory.build(configuration.getCassandraConfiguration());
    // Queue module should only have one keyspace configured
    checkArgument(keyspaces.size() == 1, "Only one keyspace expected for queue, found %s", keyspaces.keySet());
    return keyspaces.values().iterator().next();
  }
}
origin: com.bazaarvoice.emodb/emodb-sor

@Provides @Singleton @KeyspaceMap
Map<String, CassandraKeyspace> provideKeyspaces(DataStoreConfiguration configuration, CassandraFactory factory) {
  Map<String, CassandraKeyspace> keyspaceMap = Maps.newHashMap();
  for (CassandraConfiguration cassandraConfig : configuration.getCassandraClusters().values()) {
    Map<String, CassandraKeyspace> keyspacesInCluster = factory.build(cassandraConfig);
    keyspaceMap.putAll(keyspacesInCluster);
  }
  return ImmutableMap.copyOf(keyspaceMap);
}
origin: bazaarvoice/emodb

@Provides @Singleton @KeyspaceMap
Map<String, CassandraKeyspace> provideKeyspaces(DataStoreConfiguration configuration, CassandraFactory factory) {
  Map<String, CassandraKeyspace> keyspaceMap = Maps.newHashMap();
  for (CassandraConfiguration cassandraConfig : configuration.getCassandraClusters().values()) {
    Map<String, CassandraKeyspace> keyspacesInCluster = factory.build(cassandraConfig);
    keyspaceMap.putAll(keyspacesInCluster);
  }
  return ImmutableMap.copyOf(keyspaceMap);
}
origin: bazaarvoice/emodb

@Provides @Singleton @KeyspaceMap
Map<String, CassandraKeyspace> provideKeyspaces(BlobStoreConfiguration configuration, CassandraFactory factory) {
  Map<String, CassandraKeyspace> keyspaceMap = Maps.newHashMap();
  for (CassandraConfiguration cassandraConfig : configuration.getCassandraClusters().values()) {
    Map<String, CassandraKeyspace> keyspacesInCluster = factory.build(cassandraConfig);
    keyspaceMap.putAll(keyspacesInCluster);
  }
  return ImmutableMap.copyOf(keyspaceMap);
}
com.bazaarvoice.emodb.common.cassandraCassandraFactory

Javadoc

Dropwizard factory for Cassandra per-keyspace connection pools. Integrates with the Dropwizard lifecycle events (start, stop) and adds a health check for the connection pool.

Most used methods

  • build
  • cqlSessionForHintsPoller
  • newHealthCheck

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Path (java.nio.file)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now