Serialization for idalloc and animqueue
This commit is contained in:
@@ -76,7 +76,7 @@ private:
|
||||
std::vector<int64_t> salvaged_;
|
||||
int64_t next_batch_;
|
||||
int64_t next_id_;
|
||||
int queue_fill_;
|
||||
int32_t queue_fill_;
|
||||
friend int unittests_idalloc(lua_State *L);
|
||||
|
||||
public:
|
||||
@@ -120,10 +120,8 @@ public:
|
||||
// batch if possible. If not, fetches one ID from the global pool.
|
||||
int64_t alloc_id_for_thread(lua_State *L);
|
||||
|
||||
// Serialize to a streambuffer.
|
||||
// Serialize to or deserialize from a streambuffer.
|
||||
void serialize(StreamBuffer *sb);
|
||||
|
||||
// Deserialize from a streambuffer.
|
||||
void deserialize(StreamBuffer *sb);
|
||||
};
|
||||
|
||||
@@ -163,10 +161,9 @@ public:
|
||||
// Return the size of the queue.
|
||||
int size() { return ranges_.size(); }
|
||||
|
||||
// Serialize to a streambuffer.
|
||||
// Serialize to or deserialize from a streambuffer.
|
||||
// Caution: the pointer to the global pool is not serialized or deserialized.
|
||||
void serialize(StreamBuffer *sb);
|
||||
|
||||
// Deserialize from a streambuffer.
|
||||
void deserialize(StreamBuffer *sb);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user