Commit a00f0010 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2e4a4546
...@@ -100,6 +100,9 @@ type loadState struct { ...@@ -100,6 +100,9 @@ type loadState struct {
// Ghostable is the interface describing in-RAM object who can release its in-RAM state. // Ghostable is the interface describing in-RAM object who can release its in-RAM state.
type Ghostable interface { type Ghostable interface {
// DropState should discard in-RAM object state. // DropState should discard in-RAM object state.
//
// It is called by persistency machinery only on non-ghost objects,
// i.e. when the objects has its in-RAM state.
DropState() DropState()
} }
...@@ -111,7 +114,7 @@ type Stateful interface { ...@@ -111,7 +114,7 @@ type Stateful interface {
// It is called by persistency machinery only on non-ghost objects, // It is called by persistency machinery only on non-ghost objects,
// i.e. when the object has its in-RAM state. // i.e. when the object has its in-RAM state.
// //
// XXX buf ownership? // GetState should return a new buffer reference.
GetState() *mem.Buf GetState() *mem.Buf
// SetState should set state of the in-RAM object from raw data. // SetState should set state of the in-RAM object from raw data.
......
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