MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Stop

Method Stop

internal/caches/storage_file.go:941–973  ·  view source on GitHub ↗

Stop 停止

()

Source from the content-addressed store, hash-verified

939
940// Stop 停止
941func (this *FileStorage) Stop() {
942 events.Remove(this)
943
944 this.locker.Lock()
945 defer this.locker.Unlock()
946
947 // 先尝试内存缓存
948 this.runMemoryStorageSafety(func(memoryStorage *MemoryStorage) {
949 memoryStorage.Stop()
950 })
951
952 if this.list != nil {
953 _ = this.list.Reset()
954 }
955
956 if this.purgeTicker != nil {
957 this.purgeTicker.Stop()
958 }
959 if this.hotTicker != nil {
960 this.hotTicker.Stop()
961 }
962
963 if this.list != nil {
964 _ = this.list.Close()
965 }
966
967 var openFileCache = this.openFileCache
968 if openFileCache != nil {
969 openFileCache.CloseAll()
970 }
971
972 this.ignoreKeys.Reset()
973}
974
975// TotalDiskSize 消耗的磁盘尺寸
976func (this *FileStorage) TotalDiskSize() int64 {

Callers

nothing calls this directly

Calls 8

RemoveFunction · 0.92
CloseAllMethod · 0.80
StopMethod · 0.65
ResetMethod · 0.65
CloseMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected