func (obj *TransactTable) Item(id int) *TableItem {
	defer obj.mu.Unlock()
	obj.mu.Lock()
	return obj.mp[id]
}
Item - get item in table by ID
package objects
import (
	"sync"
)
type TableItem struct {
	transact   *Transaction
	prevoiseID int
	nextID     int
}
type TransactTable struct {
	firstID int                 
	lastID  int                 
	mp      map[int]*TableItem  
	mu      *sync.Mutex
}
func NewTransactTable() *TransactTable {
	obj := &TransactTable{
		lastID:  -1,
		firstID: -1,
		mp:      make(map[int]*TableItem),
		mu:      &sync.Mutex{},
	}
	return obj
}
func (obj *TransactTable) Remove(transact *Transaction) {
	defer obj.mu.Unlock()
	obj.mu.Lock()
	item := obj.mp[transact.GetID()]
	if item == nil {
		return
	}
	if item.prevoiseID != -1 {
		prevoiseItem := obj.mp[item.prevoiseID]
		if prevoiseItem != nil {
			prevoiseItem.nextID = item.nextID
		}
	}
	delete(obj.mp, transact.GetID())
}
func (obj *TransactTable) Items() map[int]*TableItem {
	defer obj.mu.Unlock()
	obj.mu.Lock()
	items := make(map[int]*TableItem)
	for k, v := range obj.mp {
		items[k] = v
	}
	return items
}
func (obj *TransactTable) Push(transact *Transaction) {
	defer obj.mu.Unlock()
	obj.mu.Lock()
	if obj.firstID == -1 {
		obj.firstID = transact.GetID()
	} else {
		lastTransact := obj.mp[obj.lastID]
		if lastTransact != nil {
			lastTransact.nextID = transact.GetID()
		}
	}
	obj.mp[transact.GetID()] = &TableItem{transact: transact, nextID: -1, prevoiseID: obj.lastID}
	obj.lastID = transact.GetID()
}
func (obj *TransactTable) Pop() *Transaction {
	defer obj.mu.Unlock()
	obj.mu.Lock()
	item := obj.mp[obj.firstID]
	if item != nil {
		r := obj.firstID
		obj.firstID = item.nextID
		delete(obj.mp, r)
	}
	return item.transact
}
func (obj *TransactTable) Len() int {
	return len(obj.mp)
}