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
546 B

3 years ago
3 years ago
  1. package page_writer
  2. type DirtyPages interface {
  3. AddPage(offset int64, data []byte, isSequential bool)
  4. FlushData() error
  5. ReadDirtyDataAt(data []byte, startOffset int64) (maxStop int64)
  6. GetStorageOptions() (collection, replication string)
  7. Destroy()
  8. LockForRead(startOffset, stopOffset int64)
  9. UnlockForRead(startOffset, stopOffset int64)
  10. }
  11. func max(x, y int64) int64 {
  12. if x > y {
  13. return x
  14. }
  15. return y
  16. }
  17. func min(x, y int64) int64 {
  18. if x < y {
  19. return x
  20. }
  21. return y
  22. }
  23. func minInt(x, y int) int {
  24. if x < y {
  25. return x
  26. }
  27. return y
  28. }