Commit 9c6e2569 authored by vipwzw's avatar vipwzw

add some test

parent 003b84a1
......@@ -71,6 +71,11 @@ func (cache *Queue) CreateSkipValue(item Scorer) *SkipValue {
return skvalue
}
//MaxSize 最大的cache数量
func (cache *Queue) MaxSize() int64 {
return cache.maxsize
}
//Exist 是否存在
func (cache *Queue) Exist(hash string) bool {
_, exists := cache.txMap[hash]
......
......@@ -234,6 +234,9 @@ func (sl *SkipList) Insert(value *SkipValue) int {
// Delete 删除节点
func (sl *SkipList) Delete(value *SkipValue) int {
if value == nil {
return 0
}
var update [maxLevel]*skipListNode
x := sl.header
for i := sl.level - 1; i >= 0; i-- {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment