Files
seaweedfs/weed/filesys/page_writer/dirty_pages.go

31 lines
527 B
Go
Raw Normal View History

2021-12-20 01:02:23 -08:00
package page_writer
2021-05-09 15:33:01 -07:00
type DirtyPages interface {
AddPage(offset int64, data []byte)
FlushData() error
ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64)
GetStorageOptions() (collection, replication string)
2021-12-23 17:17:32 -08:00
Destroy()
LockForRead(startOffset, stopOffset int64)
UnlockForRead(startOffset, stopOffset int64)
2021-12-23 17:17:32 -08:00
}
func max(x, y int64) int64 {
if x > y {
return x
}
return y
}
func min(x, y int64) int64 {
if x < y {
return x
}
return y
}
func minInt(x, y int) int {
if x < y {
return x
}
return y
2021-05-09 15:33:01 -07:00
}