btreelist

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: MIT Imports: 3 Imported by: 0

README

btree-list

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Id              int
	InstancePointer interface{}
	Active          int64
}

func (*Item) Less

func (i *Item) Less(item btree.Item) bool

type List

type List struct {
	Tree      *btree.BTree
	MutexLock *sync.RWMutex
}

func New

func New() *List

func (*List) Add

func (list *List) Add(id int, instancePointer interface{})

func (*List) Delete

func (list *List) Delete(id int)

func (*List) Get

func (list *List) Get(id int) *Item

func (*List) Lock

func (list *List) Lock()

func (*List) Unlock

func (list *List) Unlock()

func (*List) UpdateActive

func (list *List) UpdateActive(id int, timestamp int64) bool

func (*List) UpdateActiveByTime

func (list *List) UpdateActiveByTime(id int) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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