Package sortlist

import "github.com/byte-mug/golibs/concurrent/sortlist"

Overview

Yet another Concurrent Skiplist implementation. Changes are performed using atomic CAS operations. Inserts acquire a shared lock and Writes acquire an exclusive lock. All locking is done internally.

Index

type Node

type Node struct {
	Key	interface{}
	Value	interface{}
	// contains filtered or unexported fields
}

-

func (*Node) Next

func (n *Node) Next() *Node

-

func (*Node) String

func (n *Node) String() string

-

type Sortlist

type Sortlist struct {
	Cmp	utils.Comparator	// Required.
	Src	rand.Source		// Optional.
	// contains filtered or unexported fields
}

-

func (*Sortlist) Ceil

func (s *Sortlist) Ceil(sk interface{}) *Node

-

func (*Sortlist) Delete

func (s *Sortlist) Delete(k interface{}) *Node

-

func (*Sortlist) Floor

func (s *Sortlist) Floor(sk interface{}) *Node

-

func (*Sortlist) Insert

func (s *Sortlist) Insert(k, v interface{})

This function should really be called Put()!

func (*Sortlist) Lookup

func (s *Sortlist) Lookup(sk interface{}) *Node

-

func (*Sortlist) Next

func (s *Sortlist) Next(sk interface{}) *Node

-

func (*Sortlist) Previous

func (s *Sortlist) Previous(sk interface{}) *Node

-

Dependencies