Class: FDB::DirectoryPartition
Instance Attribute Summary
#directory_layer
Attributes inherited from Subspace
#raw_prefix
Instance Method Summary
collapse
#create, #create_or_open, #exists?, #layer, #list, #move, #move_to, #open, #path, #remove, #remove_if_exists
Constructor Details
#initialize(path, prefix, parent_directory_layer) ⇒ DirectoryPartition
Returns a new instance of DirectoryPartition.
593
594
595
596
597
598
599
|
# 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
|
Instance Method Details
#[](name) ⇒ Object
601
602
603
|
# File 'lib/fdbdirectory.rb', line 601
def [](name)
raise 'Cannot open subspace in the root of a directory partition.'
end
|
#as_foundationdb_key ⇒ Object
625
626
627
|
# 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) ⇒ Boolean
621
622
623
|
# 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 ⇒ Object
605
606
607
|
# File 'lib/fdbdirectory.rb', line 605
def key
raise 'Cannot get key for the root of a directory partition.'
end
|
#pack(tuple) ⇒ Object
609
610
611
|
# File 'lib/fdbdirectory.rb', line 609
def pack(tuple)
raise 'Cannot pack keys using the root of a directory partition.'
end
|
#range(tuple = []) ⇒ Object
617
618
619
|
# File 'lib/fdbdirectory.rb', line 617
def range(tuple=[])
raise 'Cannot get range for the root of a directory partition.'
end
|
#subspace(tuple) ⇒ Object
629
630
631
|
# File 'lib/fdbdirectory.rb', line 629
def subspace(tuple)
raise 'Cannot open subspace in the root of a directory partition.'
end
|
#unpack(key) ⇒ Object
613
614
615
|
# File 'lib/fdbdirectory.rb', line 613
def unpack(key)
raise 'Cannot unpack keys using the root of a directory partition.'
end
|