Skip to content

Commit

Permalink
Add chunk_id() and offset() to grnxx::StorageNode.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yata committed May 22, 2013
1 parent a8a0db4 commit 1694ab9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/grnxx/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ StorageNodeStatus StorageNode::status() const {
return header_->status;
}

uint16_t StorageNode::chunk_id() const {
return header_->chunk_id;
}

uint64_t StorageNode::offset() const {
return header_->offset;
}

uint64_t StorageNode::size() const {
return header_->size;
}
Expand Down
4 changes: 4 additions & 0 deletions lib/grnxx/storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ class StorageNode {
uint32_t id() const;
// Return the status.
StorageNodeStatus status() const;
// Return the ID of the chunk to which the node belongs.
uint16_t chunk_id() const;
// Return the offset in chunk.
uint64_t offset() const;
// Return the body size.
uint64_t size() const;
// Return the last modified time.
Expand Down

0 comments on commit 1694ab9

Please sign in to comment.