Class: Aerospike::Record

Inherits:
Object
  • Object
show all
Defined in:
lib/aerospike/record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, rec_key, rec_bins, rec_gen, rec_exp) ⇒ Record

Returns a new instance of Record.



28
29
30
31
32
33
34
# File 'lib/aerospike/record.rb', line 28

def initialize(node, rec_key, rec_bins, rec_gen, rec_exp)
  @key = rec_key
  @bins = rec_bins
  @generation = rec_gen
  @ttl = expiration_to_ttl(rec_exp)
  @node = node
end

Instance Attribute Details

#binsObject (readonly)

Returns the value of attribute bins.



24
25
26
# File 'lib/aerospike/record.rb', line 24

def bins
  @bins
end

#generationObject (readonly)

Returns the value of attribute generation.



24
25
26
# File 'lib/aerospike/record.rb', line 24

def generation
  @generation
end

#keyObject (readonly)

Returns the value of attribute key.



24
25
26
# File 'lib/aerospike/record.rb', line 24

def key
  @key
end

#nodeObject (readonly)

Returns the value of attribute node.



24
25
26
# File 'lib/aerospike/record.rb', line 24

def node
  @node
end

#ttlObject (readonly) Also known as: expiration

Returns the value of attribute ttl.



24
25
26
# File 'lib/aerospike/record.rb', line 24

def ttl
  @ttl
end

Instance Method Details

#to_sObject



38
39
40
# File 'lib/aerospike/record.rb', line 38

def to_s
  "key: `#{key}` bins: `#{bins}` generation: `#{generation}`, ttl: `#{ttl}`"
end