virtual bool _enqueue(T *) = 0;
virtual void _dequeue(T *) = 0;
virtual void _dequeue(list<T*> *) = 0;
- virtual void _process(const list<T*> &) { assert(0); }
- virtual void _process(const list<T*> &items, TPHandle &handle) {
- _process(items);
- }
virtual void _process_finish(const list<T*> &) {}
// virtual methods from WorkQueue_ below
delete (list<T*> *)p;
}
+ protected:
+ virtual void _process(const list<T*> &) { assert(0); }
+ virtual void _process(const list<T*> &items, TPHandle &handle) {
+ _process(items);
+ }
+
public:
BatchWorkQueue(string n, time_t ti, time_t sti, ThreadPool* p)
: WorkQueue_(n, ti, sti), pool(p) {
virtual void _enqueue_front(T) = 0;
virtual bool _empty() = 0;
virtual U _dequeue() = 0;
- virtual void _process(U) { assert(0); }
- virtual void _process(U u, TPHandle &) {
- _process(u);
- }
virtual void _process_finish(U) {}
void *_void_dequeue() {
void unlock() {
pool->unlock();
}
+ virtual void _process(U) { assert(0); }
+ virtual void _process(U u, TPHandle &) {
+ _process(u);
+ }
};
/** @brief Template by-pointer work queue.
virtual void _dequeue(T *) = 0;
/// Dequeue a work item and return the original submitted pointer.
virtual T *_dequeue() = 0;
- /// Process a work item. Called from the worker threads.
- virtual void _process(T *t) { assert(0); }
- virtual void _process(T *t, TPHandle &) {
- _process(t);
- }
virtual void _process_finish(T *) {}
// implementation of virtual methods from WorkQueue_
_process_finish(static_cast<T *>(p));
}
+ protected:
+ /// Process a work item. Called from the worker threads.
+ virtual void _process(T *t) { assert(0); }
+ virtual void _process(T *t, TPHandle &) {
+ _process(t);
+ }
+
public:
WorkQueue(string n, time_t ti, time_t sti, ThreadPool* p) : WorkQueue_(n, ti, sti), pool(p) {
pool->add_work_queue(this);
_queue.pop_front();
return c;
}
+ using WorkQueueVal<GenContext<ThreadPool::TPHandle&>*>::_process;
void _process(GenContext<ThreadPool::TPHandle&> *c, ThreadPool::TPHandle &tp) {
c->complete(tp);
}
virtual void _process(std::pair<Context *, int> item) {
item.first->complete(item.second);
}
+ using ThreadPool::WorkQueueVal<std::pair<Context *, int> >::_process;
private:
list<std::pair<Context *, int> > _queue;
};
};
friend std::ostream &operator<<(ostream& out, const lowprecision_t& v);
+ using OSDUtilizationDumper<TextTable>::dump_item;
virtual void dump_item(const CrushTreeDumper::Item &qi,
float &reweight,
int64_t kb,
}
protected:
+ using OSDUtilizationDumper<Formatter>::dump_item;
virtual void dump_item(const CrushTreeDumper::Item &qi,
float &reweight,
int64_t kb,
void _process(OpSequencer *osr, ThreadPool::TPHandle &handle) {
store->_do_op(osr, handle);
}
+ using ThreadPool::WorkQueue<OpSequencer>::_process;
void _process_finish(OpSequencer *osr) {
store->_finish_op(osr);
}
void do_force_sync();
void start_sync(Context *onsafe);
void sync();
+ using JournalingObjectStore::sync;
void _flush_op_queue();
void flush();
void sync_and_flush();
store->op_queue.pop_front();
return osr;
}
+ using ThreadPool::WorkQueue<OpSequencer>::_process;
void _process(OpSequencer *osr, ThreadPool::TPHandle &handle) {
store->_do_op(osr, handle);
}
void start_sync() {}
void sync() {}
+ using ObjectStore::sync;
void flush() {}
void sync_and_flush() {}
(*i)->put("PeeringWQ");
}
}
+ using ThreadPool::BatchWorkQueue<PG>::_process;
void _process_finish(const list<PG *> &pgs) {
for (list<PG*>::const_iterator i = pgs.begin();
i != pgs.end();
osd->osd_lock.Unlock();
delete c;
}
+ void _process(Command *c, ThreadPool::TPHandle &tp) {
+ _process(c);
+ }
void _clear() {
while (!osd->command_queue.empty()) {
Command *c = osd->command_queue.front();
osd->do_recovery(pg, handle);
pg->put("RecoveryWQ");
}
+ using ThreadPool::WorkQueue<PG>::_process;
void _clear() {
while (!osd->recovery_queue.empty()) {
PG *pg = osd->recovery_queue.front();
remove_queue.pop_front();
return item;
}
+ using ThreadPool::WorkQueueVal<pair<PGRef, DeletingStateRef> >::_process;
void _process(pair<PGRef, DeletingStateRef>, ThreadPool::TPHandle &);
void _clear() {
remove_queue.clear();
expected_write_size);
}
+ using PGBackend::PGTransaction::append;
void append(
PGTransaction *_to_append
) {
const map<pg_shard_t, pg_missing_t> &get_shard_missing() const {
return peer_missing;
}
+ using PGBackend::Listener::get_shard_missing;
const map<pg_shard_t, pg_info_t> &get_shard_info() const {
return peer_info;
}
+ using PGBackend::Listener::get_shard_info;
const pg_missing_t &get_local_missing() const {
return pg_log.get_missing();
}
perfcounter->inc(l_rgw_qlen, -1);
return req;
}
+ using ThreadPool::WorkQueue<RGWRequest>::_process;
void _process(RGWRequest *req) {
perfcounter->inc(l_rgw_qactive);
process->handle_request(req);
virtual ~RGWHandler_ObjStore_S3() {}
int validate_bucket_name(const string& bucket, bool relaxed_names);
-
+ using RGWHandler_ObjStore::validate_bucket_name;
+
virtual int init(RGWRados *store, struct req_state *state, RGWClientIO *cio);
virtual int authorize() {
return RGW_Auth_S3::authorize(store, s);
RGWRESTMgr_S3() {}
virtual ~RGWRESTMgr_S3() {}
- virtual RGWRESTMgr *get_resource_mgr(struct req_state *s, const string& uri) {
- return this;
- }
virtual RGWHandler *get_handler(struct req_state *s);
};
RGWRESTMgr_SWIFT() {}
virtual ~RGWRESTMgr_SWIFT() {}
- virtual RGWRESTMgr *get_resource_mgr(struct req_state *s, const string& uri) {
- return this;
- }
virtual RGWHandler *get_handler(struct req_state *s);
};
bool _empty() {
return item_queue.empty();
}
+ using ThreadPool::WorkQueue<write_item>::_process;
void _process(write_item *item) {
return backend->_write(
item->oid,
q.pop_front();
return val;
}
+ using ThreadPool::WorkQueue<unsigned>::_process;
void _process(unsigned *item) {
next->queue(item);
}