trait AvlTree extends AnyRef
Type of data which efficiently authenticates potentially huge dataset having key-value dictionary interface. Only root hash of dynamic AVL+ tree, tree height, key length, optional value length, and access flags are stored in an instance of the datatype.
Please note that standard hash function from scorex.crypto.hash
is used, and height is stored along with root hash of
the tree, thus digest
size is always CryptoConstants.hashLength + 1 bytes.
This interface is used as runtime representation of the AvlTree type of ErgoTree.
- Alphabetic
- By Inheritance
- AvlTree
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def digest: Coll[Byte]
Returns digest of the state represented by this tree.
Returns digest of the state represented by this tree. Authenticated tree digest = root hash bytes ++ tree height
- abstract def enabledOperations: Byte
Flags of enabled operations packed in single byte.
Flags of enabled operations packed in single byte. isInsertAllowed == (enabledOperations & 0x01) != 0 isUpdateAllowed == (enabledOperations & 0x02) != 0 isRemoveAllowed == (enabledOperations & 0x04) != 0
- abstract def isInsertAllowed: Boolean
Checks if Insert operation is allowed for this tree instance.
- abstract def isRemoveAllowed: Boolean
Checks if Remove operation is allowed for this tree instance.
- abstract def isUpdateAllowed: Boolean
Checks if Update operation is allowed for this tree instance.
- abstract def keyLength: Int
All the elements under the tree have the same length of the keys
- abstract def updateDigest(newDigest: Coll[Byte]): AvlTree
Replace digest of this tree producing a new tree.
Replace digest of this tree producing a new tree. Since AvlTree is immutable, this tree instance remains unchanged.
- newDigest
a new digest
- returns
a copy of this AvlTree instance where
this.digest
replaced bynewDigest
- abstract def updateOperations(newOperations: Byte): AvlTree
Enable/disable operations of this tree producing a new tree.
Enable/disable operations of this tree producing a new tree. Since AvlTree is immutable,
this
tree instance remains unchanged.- newOperations
a new flags which specify available operations on a new tree.
- returns
a copy of this AvlTree instance where
this.enabledOperations
replaced bynewOperations
- abstract def valueLengthOpt: Option[Int]
If non-empty, all the values under the tree are of the same length.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()