maps

package
v0.0.0-...-e532b39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentHashMap

type ConcurrentHashMap struct {
}

type Key

type Key string

type Map

type Map interface {
	Get(key Key) (value Value, ok bool)
	Put(key Key, value Value) (err error)
	Remove(key Key) (value Value, ok bool)
	Contains(key Key) (ok bool)
	Iterator() MapIterator
	Len() int
}

func NewConcurrentHashMap

func NewConcurrentHashMap() Map

func NewRedBlackTreeMap

func NewRedBlackTreeMap() Map

func NewSkipListMap

func NewSkipListMap() Map

func NewThreadsafeMap

func NewThreadsafeMap() Map

type MapIterator

type MapIterator interface {
	Next() bool
	Current() (key Key, value Value)
}

type RedBlackTreeMap

type RedBlackTreeMap struct {
}

func (*RedBlackTreeMap) Contains

func (t *RedBlackTreeMap) Contains(key Key) (ok bool)

func (*RedBlackTreeMap) Get

func (t *RedBlackTreeMap) Get(key Key) (value Value, ok bool)

func (*RedBlackTreeMap) Iterator

func (t *RedBlackTreeMap) Iterator() MapIterator

func (*RedBlackTreeMap) Len

func (t *RedBlackTreeMap) Len() int

func (*RedBlackTreeMap) Put

func (t *RedBlackTreeMap) Put(key Key, value Value) (err error)

func (*RedBlackTreeMap) Remove

func (t *RedBlackTreeMap) Remove(key Key) (value Value, ok bool)

type SkipListIterator

type SkipListIterator struct {
	// contains filtered or unexported fields
}

func (*SkipListIterator) Current

func (i *SkipListIterator) Current() (key Key, value Value)

func (*SkipListIterator) Next

func (i *SkipListIterator) Next() bool

type SkipListMap

type SkipListMap struct {
	// contains filtered or unexported fields
}

func (*SkipListMap) Contains

func (m *SkipListMap) Contains(key Key) bool

func (*SkipListMap) Get

func (m *SkipListMap) Get(key Key) (value Value, ok bool)

func (*SkipListMap) Iterator

func (m *SkipListMap) Iterator() MapIterator

func (*SkipListMap) Len

func (m *SkipListMap) Len() int

func (*SkipListMap) Put

func (m *SkipListMap) Put(key Key, value Value) (err error)

func (*SkipListMap) Remove

func (m *SkipListMap) Remove(key Key) (value Value, ok bool)

type ThreadsafeMap

type ThreadsafeMap struct {
	sync.RWMutex
	Map map[Key]mapValue
}

func (*ThreadsafeMap) Contains

func (m *ThreadsafeMap) Contains(key Key) (ok bool)

func (*ThreadsafeMap) Get

func (m *ThreadsafeMap) Get(key Key) (value Value, ok bool)

func (*ThreadsafeMap) Iterator

func (m *ThreadsafeMap) Iterator() MapIterator

func (*ThreadsafeMap) Len

func (m *ThreadsafeMap) Len() int

func (*ThreadsafeMap) Put

func (m *ThreadsafeMap) Put(key Key, value Value) (err error)

func (*ThreadsafeMap) Remove

func (m *ThreadsafeMap) Remove(key Key) (value Value, ok bool)

type ThreadsafeMapIterator

type ThreadsafeMapIterator struct {
	// contains filtered or unexported fields
}

func (*ThreadsafeMapIterator) Current

func (i *ThreadsafeMapIterator) Current() (Key, Value)

func (*ThreadsafeMapIterator) Next

func (i *ThreadsafeMapIterator) Next() bool

type Value

type Value []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL