(<? ch)
Same as core.async <! but throws an exception if the channel returns a throwable error.
Same as core.async <! but throws an exception if the channel returns a throwable error.
(<?? ch)
Same as core.async <!! but throws an exception if the channel returns a throwable error.
Same as core.async <!! but throws an exception if the channel returns a throwable error.
(<?resolve e)
HACK Attempt faster inlined resolve to avoid unnecessary channel ops.
HACK Attempt faster inlined resolve to avoid unnecessary channel ops.
(backtrack-up-path-until path pred)
Given a path (starting with root and ending with an index), searches backwards, passing each pair of parent & index we just came from to the predicate function. When that function returns true, we return the path ending in the index for which it was true, or else we return the empty path
Given a path (starting with root and ending with an index), searches backwards, passing each pair of parent & index we just came from to the predicate function. When that function returns true, we return the path ending in the index for which it was true, or else we return the empty path
(data-node cfg children)
Creates a new data node
Creates a new data node
(dirty! node)
Marks a node as being dirty if it was clean
Marks a node as being dirty if it was clean
(flush-tree tree backend)
(flush-tree tree backend stats)
Given the tree, finds all dirty nodes, delivering addrs into them. Every dirty node also gets replaced with its TestingAddr. These form a GC cycle, have fun with the unmanaged memory port :)
Given the tree, finds all dirty nodes, delivering addrs into them. Every dirty node also gets replaced with its TestingAddr. These form a GC cycle, have fun with the unmanaged memory port :)
(flush-tree-without-root tree backend)
(flush-tree-without-root tree backend stats root-node?)
Given the tree, finds all dirty nodes, delivering addrs into them.
Does not flush root node, but returns it.
Given the tree, finds all dirty nodes, delivering addrs into them. Does not flush root node, but returns it.
(forward-iterator path start-key)
Takes the result of a search and returns an iterator going forward over the tree. Does lg(n) backtracking sometimes.
Takes the result of a search and returns an iterator going forward over the tree. Does lg(n) backtracking sometimes.
(forward-iterator iter-ch path start-key)
Takes the result of a search and puts the iterated elements onto iter-ch going forward over the tree as needed. Does lg(n) backtracking sometimes.
Takes the result of a search and puts the iterated elements onto iter-ch going forward over the tree as needed. Does lg(n) backtracking sometimes.
(go-try & body)
Asynchronously executes the body in a go block. Returns a channel which will receive the result of the body when completed or the exception if an exception is thrown. You are responsible to take this exception and deal with it! This means you need to take the result from the channel at some point.
Asynchronously executes the body in a go block. Returns a channel which will receive the result of the body when completed or the exception if an exception is thrown. You are responsible to take this exception and deal with it! This means you need to take the result from the channel at some point.
(write-node backend node session)
Writes the given node to storage, returning a go-block with its assigned address
Writes the given node to storage, returning a go-block with its assigned address
(delete-addr backend addr session)
Deletes the given addr from storage
Deletes the given addr from storage
(new-session backend)
Returns a session object that will collect stats
Returns a session object that will collect stats
(anchor-root backend node)
Tells the backend this is a temporary root
Tells the backend this is a temporary root
(if-cljs then else)
Return then if we are generating cljs code and else for Clojure code. https://groups.google.com/d/msg/clojurescript/iBY5HaQda4A/w1lAQi9_AwsJ
Return then if we are generating cljs code and else for Clojure code. https://groups.google.com/d/msg/clojurescript/iBY5HaQda4A/w1lAQi9_AwsJ
(index-node-keys children)
Calculates the separating keys given the children of an index node
Calculates the separating keys given the children of an index node
(lookup node key)
Returns the child node which contains the given key
Returns the child node which contains the given key
(merge-node node other)
Combines this node with the other to form a bigger node. We assume they're siblings
Combines this node with the other to form a bigger node. We assume they're siblings
(overflow? node)
Returns true if this node has too many elements
Returns true if this node has too many elements
(split-node node)
Returns a Split object with the 2 nodes that we turned this into
Returns a Split object with the 2 nodes that we turned this into
(underflow? node)
Returns true if this node has too few elements
Returns true if this node has too few elements
All nodes must implement this protocol. It's includes the minimal functionality necessary to avoid resolving nodes unless strictly necessary.
All nodes must implement this protocol. It's includes the minimal functionality necessary to avoid resolving nodes unless strictly necessary.
(index? _)
Returns true if this is an index node
Returns true if this is an index node
(dirty? _)
Returns true if this should be flushed
Returns true if this should be flushed
(last-key _)
Returns the rightmost key of the node
Returns the rightmost key of the node
(resolve _)
Returns the INode version of this node in a go-block; could trigger IO
Returns the INode version of this node in a go-block; could trigger IO
(lookup-key tree key)
(lookup-key tree key not-found)
Given a B-tree and a key, gets an iterator into the tree
Given a B-tree and a key, gets an iterator into the tree
(lookup-path tree key)
Given a B-tree and a key, gets a path into the tree
Given a B-tree and a key, gets a path into the tree
(nth-of-set set index)
Like nth, but for sorted sets. O(n)
Like nth, but for sorted sets. O(n)
(print-index-node node writer fully-qualified?)
Optionally include
Optionally include
(reduce< go-f init s)
Reduces over a sequence s with a go function go-f given the initial value init.
Reduces over a sequence s with a go function go-f given the initial value init.
(right-successor path)
Given a node on a path, find's that node's right successor node
Given a node on a path, find's that node's right successor node
(throw-if-exception x)
Helper method that checks if x is Exception and if yes, wraps it in a new exception, passing though ex-data if any, and throws it. The wrapping is done to maintain a full stack trace when jumping between multiple contexts.
Helper method that checks if x is Exception and if yes, wraps it in a new exception, passing though ex-data if any, and throws it. The wrapping is done to maintain a full stack trace when jumping between multiple contexts.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close