You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
527 B
30 lines
527 B
package page_writer
|
|
|
|
type DirtyPages interface {
|
|
AddPage(offset int64, data []byte)
|
|
FlushData() error
|
|
ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64)
|
|
GetStorageOptions() (collection, replication string)
|
|
Destroy()
|
|
LockForRead(startOffset, stopOffset int64)
|
|
UnlockForRead(startOffset, stopOffset int64)
|
|
}
|
|
|
|
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
|
|
}
|