class CassandraSnapshot
Attributes
cluster[R]
date[R]
metadata[R]
node[R]
Public Class Methods
new(cluster, node, date, metadata = nil)
click to toggle source
# File lib/cassandra.rb, line 141 def initialize(cluster, node, date, metadata = nil) @cluster = cluster @node = node @date = date @metadata = if metadata.nil? Set.new else metadata end end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/cassandra.rb, line 160 def <=>(other) c = @cluster <=> other.cluster n = @node <=> other.node d = @date <=> other.date c * 3 + n * 2 + d end
==(other)
click to toggle source
# File lib/cassandra.rb, line 156 def ==(other) @cluster == other.cluster && @node == other.node && @date == other.date end
get_date()
click to toggle source
# File lib/cassandra.rb, line 167 def get_date DateTime.strptime(@date, '%Y_%m_%d') end
to_s()
click to toggle source
# File lib/cassandra.rb, line 152 def to_s "[#{@cluster}|#{@node}|#{@date}]" end