Class: CassandraModel::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/cassandra-model/connection.rb

Class Method Summary collapse

Class Method Details

.connectionObject



11
12
13
# File 'lib/cassandra-model/connection.rb', line 11

def self.connection
  return @@Pool.connection_pool.connection
end

.initObject



6
7
8
9
# File 'lib/cassandra-model/connection.rb', line 6

def self.init
  Config.init
  @@Pool = Cassandra::Pooled.new Config.keyspace, Config.hosts
end