18 #ifndef FOEDUS_STORAGE_ARRAY_ARRAY_STORAGE_HPP_
19 #define FOEDUS_STORAGE_ARRAY_ARRAY_STORAGE_HPP_
83 bool install_volatile,
126 void *payload, uint16_t payload_offset, uint16_t payload_count);
139 template <
typename T>
141 T *payload, uint16_t payload_offset);
171 template <
typename T>
174 uint16_t payload_offset,
182 const void** payload_batch);
212 const void *payload, uint16_t payload_offset, uint16_t payload_count);
225 template <
typename T>
227 T payload, uint16_t payload_offset);
246 uint16_t payload_offset,
247 uint16_t payload_count);
261 template <
typename T>
267 uint16_t payload_offset);
283 template <
typename T>
285 T *value, uint16_t payload_offset);
301 template <
typename T>
306 uint16_t payload_offset);
323 #endif // FOEDUS_STORAGE_ARRAY_ARRAY_STORAGE_HPP_
ErrorCode increment_record(thread::Thread *context, ArrayOffset offset, T *value, uint16_t payload_offset)
This one further optimizes overwrite_record_primitive() for the frequent use case of incrementing som...
ErrorCode get_record_for_write_batch(thread::Thread *context, uint16_t batch_size, const ArrayOffset *offset_batch, Record **record_batch)
Represents one record in our key-value store.
Definitions of IDs in this package and a few related constant values.
Pimpl object of ArrayStorage.
ArrayCreateLogType ThisCreateLogType
uint32_t StorageId
Unique ID for storage.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Represents a key-value store based on a dense and regular array.
const ArrayMetadata * get_array_metadata() const
Represents one thread running on one NUMA core.
uint64_t ArrayOffset
The only key type in array storage.
ArrayStorage & operator=(const ArrayStorage &other)
uint16_t get_payload_size() const
Returns byte size of one record in this array storage without internal overheads. ...
Forward declarations of classes in root package.
Brings error stacktrace information as return value of functions.
Forward declarations of classes in array storage package.
friend std::ostream & operator<<(std::ostream &o, const ArrayStorage &v)
ErrorStack create(const Metadata &metadata)
ErrorCode overwrite_record(thread::Thread *context, ArrayOffset offset, const void *payload)
Overwrites one record of the given offset in this array storage.
ErrorCode get_record_primitive_batch(thread::Thread *context, uint16_t payload_offset, uint16_t batch_size, const ArrayOffset *offset_batch, T *payload)
batched interface
ArrayOffset get_array_size() const
Returns the size of this array.
ErrorStack verify_single_thread(thread::Thread *context)
ErrorCode get_record(thread::Thread *context, ArrayOffset offset, void *payload)
Retrieves one record of the given offset in this array storage.
Represents one key-value store.
Forward declarations of classes in storage package.
ErrorCode prefetch_pages(thread::Thread *context, bool install_volatile, bool cache_snapshot, ArrayOffset from, ArrayOffset to)
Prefetch data pages in this storage.
#define CXX11_FINAL
Used in public headers in place of "final" of C++11.
Database engine object that holds all resources and provides APIs.
Shared data of this storage type.
ErrorCode get_record_payload(thread::Thread *context, ArrayOffset offset, const void **payload)
Retrieves a pointer to the entire payload.
ErrorStack hcc_reset_all_temperature_stat()
Resets all volatile pages' temperature stat to be zero in this storage.
Log type of CREATE ARRAY STORAGE operation.
uint8_t get_levels() const
Returns the number of levels.
ErrorCode get_record_for_write(thread::Thread *context, ArrayOffset offset, Record **record)
Retrieves a pointer to the entire record for write (thus always in volatile page).
ErrorCode increment_record_oneshot(thread::Thread *context, ArrayOffset offset, T value, uint16_t payload_offset)
This is a faster increment that does not return the value after increment.
ErrorCode get_record_payload_batch(thread::Thread *context, uint16_t batch_size, const ArrayOffset *offset_batch, const void **payload_batch)
ErrorCode get_record_primitive(thread::Thread *context, ArrayOffset offset, T *payload, uint16_t payload_offset)
Retrieves a part of record of the given offset as a primitive type in this array storage.
ArrayMetadata ThisMetadata
Definitions of IDs in this package and a few related constant values.
Forward declarations of classes in thread package.
ArrayStoragePimpl ThisPimpl
A base layout of shared data for all storage types.
ErrorCode
Enum of error codes defined in error_code.xmacro.
ErrorCode overwrite_record_primitive(thread::Thread *context, ArrayOffset offset, T payload, uint16_t payload_offset)
Overwrites a part of record of the given offset as a primitive type in this array storage...
ErrorStack load(const StorageControlBlock &snapshot_block)