RockSwapDir.h
Go to the documentation of this file.
128 StoreIOState::Pointer createUpdateIO(const Ipc::StoreMapUpdate &, StoreIOState::STIOCB *, void *);
Definition: ConfigOption.h:58
generally useful configuration options supported by some children
Definition: DiskFile.h:28
Definition: DiskIOStrategy.h:20
Definition: IORequestor.h:19
Definition: Segment.h:85
Definition: StoreMap.h:57
API for adjusting external state when dirty map slice is being freed.
Definition: StoreMap.h:398
Aggregates information required for updating entry metadata and headers.
Definition: StoreMap.h:182
Definition: StoreMap.h:219
Definition: ReadRequest.h:16
Definition: RefCount.h:28
Definition: RockHeaderUpdater.h:27
Definition: RockIoState.h:26
Definition: RockRebuild.h:31
initializes shared memory segments used by Rock::SwapDir
Definition: RockSwapDir.h:156
void create() override
called when the runner should create a new memory segment
Definition: RockSwapDir.cc:1122
std::vector< SwapDir::DirMap::Owner * > mapOwners
Definition: RockSwapDir.h:167
std::vector< Ipc::Mem::Owner< Rebuild::Stats > * > rebuildStatsOwners
Definition: RockSwapDir.h:166
std::vector< Ipc::Mem::Owner< Ipc::Mem::PageStack > * > freeSlotsOwners
Definition: RockSwapDir.h:168
Definition: RockSwapDir.h:33
void readCompleted(const char *buf, int len, int errflag, RefCount< ::ReadRequest >) override
Definition: RockSwapDir.cc:840
void handleWriteCompletionProblem(const int errflag, const WriteRequest &request)
code shared by writeCompleted() error handling cases
Definition: RockSwapDir.cc:920
void dumpSizeOption(StoreEntry *e) const
reports size-specific options; mimics SwapDir::optionObjectSizeDump()
Definition: RockSwapDir.cc:534
int64_t diskOffset(int filen) const
void updateHeaders(StoreEntry *e) override
make stored metadata and HTTP headers the same as in the given entry
Definition: RockSwapDir.cc:946
bool allowOptionReconfigure(const char *const option) const override
Definition: RockSwapDir.cc:388
void disconnect(StoreEntry &e) override
called when the entry is about to forget its association with cache_dir
Definition: RockSwapDir.cc:120
void parseSize(const bool reconfiguring)
parses anonymous cache_dir size option
Definition: RockSwapDir.cc:352
ConfigOption * getOptionTree() const override
Definition: RockSwapDir.cc:369
bool parseTimeOption(char const *option, const char *value, int reconfiguring)
parses time-specific options; mimics SwapDir::optionObjectSizeParse()
Definition: RockSwapDir.cc:396
void handleWriteCompletionSuccess(const WriteRequest &request)
code shared by writeCompleted() success handling cases
Definition: RockSwapDir.cc:881
bool parseRateOption(char const *option, const char *value, int reconfiguring)
parses rate-specific options; mimics SwapDir::optionObjectSizeParse()
Definition: RockSwapDir.cc:444
void purgeSome()
purges one or more entries to make full() false and free some slots
bool unlinkdUseful() const override
whether SwapDir may benefit from unlinkd
Definition: RockSwapDir.cc:1008
StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STIOCB *, void *) override
Definition: RockSwapDir.cc:612
void finalizeSwapoutSuccess(const StoreEntry &) override
finalize the successful swapout that has been already noticed by Store
Definition: RockSwapDir.cc:170
int64_t diskOffset(Ipc::Mem::PageId &pageId) const
Definition: RockSwapDir.cc:686
bool updateAnchored(StoreEntry &) override
Definition: RockSwapDir.cc:93
bool hasReadableEntry(const StoreEntry &) const override
whether this cache dir has an entry with e.key
Definition: RockSwapDir.cc:1115
void reference(StoreEntry &e) override
somebody needs this entry (many cache replacement policies need to know)
Definition: RockSwapDir.cc:989
void writeCompleted(int errflag, size_t len, RefCount< ::WriteRequest >) override
Definition: RockSwapDir.cc:849
bool validSlotId(const SlotId slotId) const
whether the given slot ID may point to a slot in this db
Definition: RockSwapDir.cc:734
void finalizeSwapoutFailure(StoreEntry &) override
abort the failed swapout that has been already noticed by Store
Definition: RockSwapDir.cc:179
bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override
check whether we can store the entry; if we can, report current load
Definition: RockSwapDir.cc:583
void noteFreeMapSlice(const Ipc::StoreMapSliceId fileno) override
adjust slice-linked state before a locked Readable slice is erased
Definition: RockSwapDir.cc:740
uint64_t currentCount() const override
the total number of objects stored right now
Definition: RockSwapDir.cc:156
bool smpAware() const override
whether this disk storage is capable of serving multiple workers
Definition: RockSwapDir.h:54
StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STIOCB *, void *) override
Definition: RockSwapDir.cc:755
void maintain() override
purge while full(); it should be sufficient to purge just one
Definition: RockSwapDir.cc:980
void dumpRateOption(StoreEntry *e) const
reports rate-specific options; mimics SwapDir::optionObjectSizeDump()
Definition: RockSwapDir.cc:486
void ioCompletedNotification() override
Definition: RockSwapDir.cc:813
StoreIOState::Pointer createUpdateIO(const Ipc::StoreMapUpdate &, StoreIOState::STIOCB *, void *)
Definition: RockSwapDir.cc:652
void anchorEntry(StoreEntry &e, const sfileno filen, const Ipc::StoreMapAnchor &anchor)
Definition: RockSwapDir.cc:106
void dumpTimeOption(StoreEntry *e) const
reports time-specific options; mimics SwapDir::optionObjectSizeDump()
Definition: RockSwapDir.cc:435
bool parseSizeOption(char const *option, const char *value, int reconfiguring)
parses size-specific options; mimics SwapDir::optionObjectSizeParse()
Definition: RockSwapDir.cc:494
SlotId reserveSlotForWriting()
finds and returns a free db slot to fill or throws
Definition: RockSwapDir.cc:700
void updateHeadersOrThrow(Ipc::StoreMapUpdate &update)
void create() override
create system resources needed for this store to operate in the future
Definition: RockSwapDir.cc:211
void evictIfFound(const cache_key *) override
Definition: RockSwapDir.cc:1015
Definition: RockIoRequests.h:35
Definition: Store.h:42
Definition: StoreIOState.h:18
void STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)
Definition: StoreIOState.h:39
Definition: WriteRequest.h:17
int reconfiguring
Definition: forward.h:28
sfileno SlotId
db cell number, starting with cell 0 (always occupied by the db header)
Definition: forward.h:33