aerospike 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88ddd0824b7b8bf7712a48691da1c0da1cbd8840
4
- data.tar.gz: fd74e5d0890b8813f7d83b07a685c0a87ab0eaf4
3
+ metadata.gz: ecb7abe132e27049f98901edc5993ca316ea7dc5
4
+ data.tar.gz: f6e9938a22006bf8872c2e3f0caaeb1fd858da14
5
5
  SHA512:
6
- metadata.gz: 3a514354128dc14cf63bb334d45697fb3bbd091bfe459384b6d99e7bcdf9243ef2f9f917a3542664717d004a319544852ca06e19061bda25a8e4b2aa61557213
7
- data.tar.gz: b724bbe551588c5349d01837b2e4539eb7048892c1e9e6a6228e0e1f8df4c992a92389b0ad1ef42974772a3b88b10e3371b90a5e7cdd1cad9daf20a1aedf4b5a
6
+ metadata.gz: 02a72230b8ddfb9b15ca2dea45bad841a3b387d124e98e8d7c20c33cf8f413b51e36fdb0dc76f808cc6a5f0b0e5ab7aefa8a6a86e1675b5cca75dc7cb6db983c
7
+ data.tar.gz: c7e581d770f82aec05ca052ba9e69dd15e41499f48478bc2ae325f581df1283d7895f7a9684c8fc5145ec142885409728d914e51d6d88bc968d03f96af672bf6
@@ -1,3 +1,11 @@
1
+ ## March 14 2015 (1.0.2)
2
+
3
+ Minor improvements.
4
+
5
+ * **New Features**:
6
+
7
+ * Added `:new_many` method to `Aerospike::Client`
8
+
1
9
  ## Jan 28 2015 (1.0.1)
2
10
 
3
11
  Hot fix.
@@ -53,6 +53,23 @@ module Aerospike
53
53
  self
54
54
  end
55
55
 
56
+ def self.new_many(hosts, options={})
57
+ # Don't initiualize, just instantiate
58
+ client = Client.allocate
59
+
60
+ client.default_policy = Policy.new
61
+ client.default_write_policy = WritePolicy.new
62
+ client.default_scan_policy = ScanPolicy.new
63
+ client.default_query_policy = QueryPolicy.new
64
+ client.default_admin_policy = QueryPolicy.new
65
+
66
+ policy = client.send(:opt_to_client_policy , options)
67
+
68
+ client.send(:cluster=, Cluster.new(policy, *hosts))
69
+
70
+ client
71
+ end
72
+
56
73
  ##
57
74
  # Closes all client connections to database server nodes.
58
75
 
@@ -852,6 +869,10 @@ module Aerospike
852
869
  end
853
870
  end
854
871
 
872
+ def cluster=(cluster)
873
+ @cluster = cluster
874
+ end
875
+
855
876
  def batch_execute(keys, &cmd_gen)
856
877
  batch_nodes = BatchNode.generate_list(@cluster, keys)
857
878
  threads = []
@@ -335,7 +335,7 @@ module Aerospike
335
335
 
336
336
  # Finds a node by name in a list of nodes
337
337
  def find_node_name(list, name)
338
- list.any?{|name| node.name == name}
338
+ list.any?{|node| node.name == name}
339
339
  end
340
340
 
341
341
  def add_alias(host, node)
@@ -53,7 +53,7 @@ module Aerospike
53
53
  # versions >= 3.1.4. Do not use -1 for older servers.
54
54
  # 0: Default to namespace configuration variable "default-ttl" on the server.
55
55
  # > 0: Actual expiration in seconds.
56
- @expiration = opt[:expiration] || 0
56
+ @expiration = opt[:expiration] || opt[:ttl] || 0
57
57
 
58
58
  # Send user defined key in addition to hash digest on a record put.
59
59
  # The default is to send the user defined key.
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Aerospike
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aerospike
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Khosrow Afroozeh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-28 00:00:00.000000000 Z
11
+ date: 2015-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack