class XRBP::SHAMap::Node

Base Node class, all entries stored in tree structures in nodestore DB inherit from this class

Constants

LEAF_TYPES
TYPES

Attributes

hash[RW]

Public Class Methods

new(args={}) click to toggle source
# File lib/xrbp/nodestore/shamap/node.rb, line 26
def initialize(args={})
  @hash = args[:hash]
  @type = args[:type]
  @seq  = args[:seq]
end

Public Instance Methods

inner?() click to toggle source
# File lib/xrbp/nodestore/shamap/node.rb, line 36
def inner?
  false
end
leaf?() click to toggle source
# File lib/xrbp/nodestore/shamap/node.rb, line 32
def leaf?
  LEAF_TYPES.include?(@type)
end
tree_node?() click to toggle source
# File lib/xrbp/nodestore/shamap/node.rb, line 40
def tree_node?
  false
end
update_hash() click to toggle source
# File lib/xrbp/nodestore/shamap/node.rb, line 44
def update_hash
  raise "abstract: must be called on a subclass"
end