Method: PEROBS::SpaceManager#initialize

Defined in:
lib/perobs/SpaceManager.rb

#initialize(db_dir, progressmeter, btree_order = 65) ⇒ SpaceManager

Returns a new instance of SpaceManager.



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/perobs/SpaceManager.rb', line 53

def initialize(db_dir, progressmeter, btree_order = 65)
  @db_dir = db_dir
  @progressmeter = progressmeter

  @index = BTree.new(@db_dir, 'space_index', btree_order, @progressmeter)
  # The space list contains blobs that have each 2 entries. The address of
  # the space in the FlatFile and the address of the next blob in the
  # space list file that is an entry for the same space size. An address
  # of 0 marks the end of the list.
  @list = EquiBlobsFile.new(@db_dir, 'space_list', @progressmeter, 2 * 8, 1)
end