class FDB::DirectoryPartition
Public Class Methods
new(path, prefix, parent_directory_layer)
click to toggle source
Calls superclass method
FDB::DirectorySubspace::new
# File lib/fdbdirectory.rb, line 593 def initialize(path, prefix, parent_directory_layer) directory_layer = DirectoryLayer.new(:node_subspace => Subspace.new([], prefix + "\xfe"), :content_subspace => Subspace.new([], prefix)) directory_layer.send(:path=, path) super(path, prefix, directory_layer, 'partition') @parent_directory_layer = parent_directory_layer end
Public Instance Methods
[](name)
click to toggle source
# File lib/fdbdirectory.rb, line 601 def [](name) raise 'Cannot open subspace in the root of a directory partition.' end
as_foundationdb_key()
click to toggle source
# File lib/fdbdirectory.rb, line 625 def as_foundationdb_key raise 'Cannot use the root of a directory partition as a key.' end
contains?(key)
click to toggle source
# File lib/fdbdirectory.rb, line 621 def contains?(key) raise 'Cannot check whether a key belongs to the root of a directory partition.' end
key()
click to toggle source
# File lib/fdbdirectory.rb, line 605 def key raise 'Cannot get key for the root of a directory partition.' end
pack(tuple)
click to toggle source
# File lib/fdbdirectory.rb, line 609 def pack(tuple) raise 'Cannot pack keys using the root of a directory partition.' end
range(tuple=[])
click to toggle source
# File lib/fdbdirectory.rb, line 617 def range(tuple=[]) raise 'Cannot get range for the root of a directory partition.' end
subspace(tuple)
click to toggle source
# File lib/fdbdirectory.rb, line 629 def subspace(tuple) raise 'Cannot open subspace in the root of a directory partition.' end
unpack(key)
click to toggle source
# File lib/fdbdirectory.rb, line 613 def unpack(key) raise 'Cannot unpack keys using the root of a directory partition.' end
Private Instance Methods
get_layer_for_path(path)
click to toggle source
# File lib/fdbdirectory.rb, line 633 def get_layer_for_path(path) if path.length == 0 @parent_directory_layer else @directory_layer end end