cassandra-driver 3.0.3-java → 3.1.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +46 -31
- data/lib/cassandra.rb +35 -44
- data/lib/cassandra/cluster.rb +40 -11
- data/lib/cassandra/cluster/client.rb +193 -159
- data/lib/cassandra/cluster/connector.rb +12 -10
- data/lib/cassandra/cluster/control_connection.rb +38 -10
- data/lib/cassandra/cluster/options.rb +8 -4
- data/lib/cassandra/cluster/registry.rb +1 -2
- data/lib/cassandra/cluster/schema/fetchers.rb +122 -26
- data/lib/cassandra/column_container.rb +9 -4
- data/lib/cassandra/custom_data.rb +24 -22
- data/lib/cassandra/driver.rb +30 -13
- data/lib/cassandra/errors.rb +12 -2
- data/lib/cassandra/execution/options.rb +52 -16
- data/lib/cassandra/execution/profile.rb +150 -0
- data/lib/cassandra/execution/profile_manager.rb +71 -0
- data/lib/cassandra/execution/trace.rb +5 -4
- data/lib/cassandra/executors.rb +1 -1
- data/lib/cassandra/index.rb +1 -1
- data/lib/cassandra/keyspace.rb +36 -1
- data/lib/cassandra/protocol.rb +5 -0
- data/lib/cassandra/protocol/coder.rb +2 -1
- data/lib/cassandra/protocol/cql_byte_buffer.rb +21 -0
- data/lib/cassandra/protocol/responses/read_failure_error_response.rb +10 -4
- data/lib/cassandra/protocol/responses/write_failure_error_response.rb +14 -8
- data/lib/cassandra/protocol/v3.rb +2 -1
- data/lib/cassandra/protocol/v4.rb +58 -20
- data/lib/cassandra/result.rb +1 -1
- data/lib/cassandra/session.rb +43 -16
- data/lib/cassandra/statements/bound.rb +5 -1
- data/lib/cassandra/statements/prepared.rb +8 -3
- data/lib/cassandra/table.rb +72 -0
- data/lib/cassandra/trigger.rb +67 -0
- data/lib/cassandra/types.rb +12 -24
- data/lib/cassandra/udt.rb +3 -6
- data/lib/cassandra/uuid/generator.rb +6 -3
- data/lib/cassandra/version.rb +1 -1
- data/lib/cassandra_murmur3.jar +0 -0
- metadata +5 -2
@@ -49,9 +49,10 @@ module Cassandra
|
|
49
49
|
clock = ::Time)
|
50
50
|
raise ::ArgumentError, 'invalid clock' unless clock.respond_to?(:now)
|
51
51
|
|
52
|
-
@node_id
|
53
|
-
@clock_id
|
54
|
-
@clock
|
52
|
+
@node_id = Integer(node_id)
|
53
|
+
@clock_id = Integer(clock_id)
|
54
|
+
@clock = clock
|
55
|
+
@last_usecs = nil
|
55
56
|
end
|
56
57
|
|
57
58
|
# Returns a new UUID with a time component that is the current time.
|
@@ -82,6 +83,7 @@ module Cassandra
|
|
82
83
|
def now
|
83
84
|
now = @clock.now
|
84
85
|
usecs = now.to_i * 1_000_000 + now.usec
|
86
|
+
|
85
87
|
if @last_usecs && @last_usecs - @sequence <= usecs && usecs <= @last_usecs
|
86
88
|
@sequence += 1
|
87
89
|
elsif @last_usecs && @last_usecs > usecs
|
@@ -90,6 +92,7 @@ module Cassandra
|
|
90
92
|
else
|
91
93
|
@sequence = 0
|
92
94
|
end
|
95
|
+
|
93
96
|
@last_usecs = usecs + @sequence
|
94
97
|
from_usecs(@last_usecs)
|
95
98
|
end
|
data/lib/cassandra/version.rb
CHANGED
data/lib/cassandra_murmur3.jar
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cassandra-driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Theo Hultberg
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,6 +109,8 @@ files:
|
|
109
109
|
- lib/cassandra/errors.rb
|
110
110
|
- lib/cassandra/execution/info.rb
|
111
111
|
- lib/cassandra/execution/options.rb
|
112
|
+
- lib/cassandra/execution/profile.rb
|
113
|
+
- lib/cassandra/execution/profile_manager.rb
|
112
114
|
- lib/cassandra/execution/trace.rb
|
113
115
|
- lib/cassandra/executors.rb
|
114
116
|
- lib/cassandra/function.rb
|
@@ -194,6 +196,7 @@ files:
|
|
194
196
|
- lib/cassandra/timestamp_generator.rb
|
195
197
|
- lib/cassandra/timestamp_generator/simple.rb
|
196
198
|
- lib/cassandra/timestamp_generator/ticking_on_duplicate.rb
|
199
|
+
- lib/cassandra/trigger.rb
|
197
200
|
- lib/cassandra/tuple.rb
|
198
201
|
- lib/cassandra/types.rb
|
199
202
|
- lib/cassandra/udt.rb
|