Class: LeoManager::AssignedFile

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

Overview

Assigned file info Model

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h) ⇒ AssignedFile

Returns a new instance of AssignedFile.



197
198
199
200
201
202
203
204
205
206
207
# File 'lib/leo_manager_models.rb', line 197

def initialize(h)
  @node      = h[:node]
  @vnode_id  = h[:vnode_id]
  @size      = h[:size]
  @clock     = h[:clock]
  @checksum  = h[:checksum]
  timestamp = h[:timestamp]
  @timestamp = timestamp.empty? ? timestamp : Time.parse(timestamp)
  @delete    = h[:delete] != 0 # bool
  @num_of_chunks = h[:num_of_chunks]
end

Instance Attribute Details

#checksumObject (readonly)

Returns the value of attribute checksum.



195
196
197
# File 'lib/leo_manager_models.rb', line 195

def checksum
  @checksum
end

#clockObject (readonly)

Returns the value of attribute clock.



195
196
197
# File 'lib/leo_manager_models.rb', line 195

def clock
  @clock
end

#deleteObject (readonly)

Returns the value of attribute delete.



195
196
197
# File 'lib/leo_manager_models.rb', line 195

def delete
  @delete
end

#nodeObject (readonly)

Returns the value of attribute node.



195
196
197
# File 'lib/leo_manager_models.rb', line 195

def node
  @node
end

#num_of_chunksObject (readonly)

Returns the value of attribute num_of_chunks.



195
196
197
# File 'lib/leo_manager_models.rb', line 195

def num_of_chunks
  @num_of_chunks
end

#sizeObject (readonly)

Returns the value of attribute size.



195
196
197
# File 'lib/leo_manager_models.rb', line 195

def size
  @size
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



195
196
197
# File 'lib/leo_manager_models.rb', line 195

def timestamp
  @timestamp
end

#vnode_idObject (readonly)

Returns the value of attribute vnode_id.



195
196
197
# File 'lib/leo_manager_models.rb', line 195

def vnode_id
  @vnode_id
end